018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. From c6e269febbc946a54ed9dbbb2dc70feba6017607 Mon Sep 17 00:00:00 2001
  2. From: Vladimir Mezentsev <[email protected]>
  3. Date: Fri, 20 Jan 2023 15:39:55 -0800
  4. Subject: [PATCH 18/50] gprofng: PR29521 [docs] man pages are not in the
  5. release tarball
  6. gprofng/ChangeLog
  7. 2023-01-20 Vladimir Mezentsev <[email protected]>
  8. PR gprofng/29521
  9. * configure.ac: Check if $MAKEINFO and $HELP2MAN are missing.
  10. * Makefile.am: Build doc if $MAKEINFO exists.
  11. * doc/gprofng.texi: Update documentation for gprofng.
  12. * doc/Makefile.am: Build gprofng.1.
  13. * src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am.
  14. * configure: Rebuild.
  15. * Makefile.in: Rebuild.
  16. * doc/Makefile.in: Rebuild.
  17. * src/Makefile.in: Rebuild.
  18. ---
  19. gprofng/Makefile.am | 2 +-
  20. gprofng/Makefile.in | 2 +-
  21. gprofng/configure | 79 +++++++++++++++---
  22. gprofng/configure.ac | 21 +++--
  23. gprofng/doc/Makefile.am | 24 +++++-
  24. gprofng/doc/Makefile.in | 93 ++++++++++++++++++---
  25. gprofng/doc/gprofng.texi | 169 +++++++++++++++++++++++++++++++++++++++
  26. gprofng/src/Makefile.am | 8 +-
  27. gprofng/src/Makefile.in | 8 +-
  28. 9 files changed, 364 insertions(+), 42 deletions(-)
  29. --- a/gprofng/Makefile.am
  30. +++ b/gprofng/Makefile.am
  31. @@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dejagnu foreign
  32. if BUILD_COLLECTOR
  33. COLLECTOR_SUBDIRS = libcollector
  34. endif
  35. -if BUILD_MAN
  36. +if BUILD_DOC
  37. DOC_SUBDIR = doc
  38. endif
  39. if BUILD_SRC
  40. --- a/gprofng/Makefile.in
  41. +++ b/gprofng/Makefile.in
  42. @@ -381,7 +381,7 @@ zlibinc = @zlibinc@
  43. ACLOCAL_AMFLAGS = -I . -I ..
  44. AUTOMAKE_OPTIONS = dejagnu foreign
  45. @BUILD_COLLECTOR_TRUE@COLLECTOR_SUBDIRS = libcollector
  46. -@BUILD_MAN_TRUE@DOC_SUBDIR = doc
  47. +@BUILD_DOC_TRUE@DOC_SUBDIR = doc
  48. @BUILD_SRC_TRUE@SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
  49. SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
  50. DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
  51. --- a/gprofng/configure
  52. +++ b/gprofng/configure
  53. @@ -639,6 +639,8 @@ GPROFNG_CPPFLAGS
  54. GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS
  55. GPROFNG_CFLAGS
  56. LD_NO_AS_NEEDED
  57. +BUILD_DOC_FALSE
  58. +BUILD_DOC_TRUE
  59. BUILD_MAN_FALSE
  60. BUILD_MAN_TRUE
  61. HELP2MAN
  62. @@ -12221,7 +12223,7 @@ else
  63. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  64. lt_status=$lt_dlunknown
  65. cat > conftest.$ac_ext <<_LT_EOF
  66. -#line 12224 "configure"
  67. +#line 12226 "configure"
  68. #include "confdefs.h"
  69. #if HAVE_DLFCN_H
  70. @@ -12327,7 +12329,7 @@ else
  71. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  72. lt_status=$lt_dlunknown
  73. cat > conftest.$ac_ext <<_LT_EOF
  74. -#line 12330 "configure"
  75. +#line 12332 "configure"
  76. #include "confdefs.h"
  77. #if HAVE_DLFCN_H
  78. @@ -16737,9 +16739,58 @@ fi
  79. # Generate manpages, if possible.
  80. build_man=false
  81. +build_doc=false
  82. if test $cross_compiling = no; then
  83. + for ac_prog in help2man
  84. +do
  85. + # Extract the first word of "$ac_prog", so it can be a program name with args.
  86. +set dummy $ac_prog; ac_word=$2
  87. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  88. +$as_echo_n "checking for $ac_word... " >&6; }
  89. +if ${ac_cv_prog_HELP2MAN+:} false; then :
  90. + $as_echo_n "(cached) " >&6
  91. +else
  92. + if test -n "$HELP2MAN"; then
  93. + ac_cv_prog_HELP2MAN="$HELP2MAN" # Let the user override the test.
  94. +else
  95. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  96. +for as_dir in $PATH
  97. +do
  98. + IFS=$as_save_IFS
  99. + test -z "$as_dir" && as_dir=.
  100. + for ac_exec_ext in '' $ac_executable_extensions; do
  101. + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  102. + ac_cv_prog_HELP2MAN="$ac_prog"
  103. + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  104. + break 2
  105. + fi
  106. +done
  107. + done
  108. +IFS=$as_save_IFS
  109. +
  110. +fi
  111. +fi
  112. +HELP2MAN=$ac_cv_prog_HELP2MAN
  113. +if test -n "$HELP2MAN"; then
  114. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
  115. +$as_echo "$HELP2MAN" >&6; }
  116. +else
  117. + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  118. +$as_echo "no" >&6; }
  119. +fi
  120. -HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
  121. +
  122. + test -n "$HELP2MAN" && break
  123. +done
  124. +test -n "$HELP2MAN" || HELP2MAN="$MISSING help2man"
  125. +
  126. + case "x$HELP2MAN" in
  127. + x | */missing\ help2man* )
  128. + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: help2man is missing. Man pages will not be built." >&5
  129. +$as_echo "$as_me: WARNING: gprofng: help2man is missing. Man pages will not be built." >&2;}
  130. + ;;
  131. + * ) build_man=true ;;
  132. + esac
  133. for ac_prog in makeinfo
  134. do
  135. @@ -16782,10 +16833,10 @@ fi
  136. test -n "$MAKEINFO" && break
  137. done
  138. -test -n "$MAKEINFO" || MAKEINFO=""@echo makeinfo missing; true""
  139. +test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
  140. - case "$MAKEINFO" in
  141. - *true)
  142. + case "x$MAKEINFO" in
  143. + x | */missing\ makeinfo*)
  144. { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&5
  145. $as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&2;}
  146. ;;
  147. @@ -16796,9 +16847,7 @@ $as_echo "$as_me: WARNING: gprofng: make
  148. $as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentation will not be built." >&2;}
  149. MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
  150. ;;
  151. - x* )
  152. - build_man=true
  153. - ;;
  154. + x* ) build_doc=true ;;
  155. esac
  156. ;;
  157. esac
  158. @@ -16812,6 +16861,14 @@ else
  159. BUILD_MAN_FALSE=
  160. fi
  161. + if test x$build_doc = xtrue; then
  162. + BUILD_DOC_TRUE=
  163. + BUILD_DOC_FALSE='#'
  164. +else
  165. + BUILD_DOC_TRUE='#'
  166. + BUILD_DOC_FALSE=
  167. +fi
  168. +
  169. LD_NO_AS_NEEDED=${no_as_needed}
  170. @@ -17070,6 +17127,10 @@ if test -z "${BUILD_MAN_TRUE}" && test -
  171. as_fn_error $? "conditional \"BUILD_MAN\" was never defined.
  172. Usually this means the macro was only invoked conditionally." "$LINENO" 5
  173. fi
  174. +if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
  175. + as_fn_error $? "conditional \"BUILD_DOC\" was never defined.
  176. +Usually this means the macro was only invoked conditionally." "$LINENO" 5
  177. +fi
  178. : "${CONFIG_STATUS=./config.status}"
  179. ac_write_fail=0
  180. --- a/gprofng/configure.ac
  181. +++ b/gprofng/configure.ac
  182. @@ -210,11 +210,19 @@ AM_ZLIB
  183. # Generate manpages, if possible.
  184. build_man=false
  185. +build_doc=false
  186. if test $cross_compiling = no; then
  187. - AM_MISSING_PROG(HELP2MAN, help2man)
  188. - AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"])
  189. - case "$MAKEINFO" in
  190. - *true)
  191. + AC_CHECK_PROGS([HELP2MAN], help2man, [$MISSING help2man])
  192. + case "x$HELP2MAN" in
  193. + x | */missing\ help2man* )
  194. + AC_MSG_WARN([gprofng: help2man is missing. Man pages will not be built.])
  195. + ;;
  196. + * ) build_man=true ;;
  197. + esac
  198. +
  199. + AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
  200. + case "x$MAKEINFO" in
  201. + x | */missing\ makeinfo*)
  202. AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not be built.])
  203. ;;
  204. *)
  205. @@ -223,15 +231,14 @@ if test $cross_compiling = no; then
  206. AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not be built.])
  207. MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
  208. ;;
  209. - x* )
  210. - build_man=true
  211. - ;;
  212. + x* ) build_doc=true ;;
  213. esac
  214. ;;
  215. esac
  216. AC_SUBST(MAKEINFO)
  217. fi
  218. AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
  219. +AM_CONDITIONAL([BUILD_DOC], [test x$build_doc = xtrue])
  220. AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}])
  221. AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}])
  222. --- a/gprofng/doc/Makefile.am
  223. +++ b/gprofng/doc/Makefile.am
  224. @@ -19,9 +19,31 @@
  225. AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
  226. +# Options to extract the man page
  227. +MANCONF = -Dman
  228. +
  229. +TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
  230. +POD2MAN = pod2man --center="User Commands" \
  231. + --release="binutils-$(VERSION)" --section=1
  232. +
  233. info_TEXINFOS = gprofng.texi
  234. gprofng_TEXINFOS = fdl.texi
  235. TEXINFO_TEX = .
  236. MAKEINFOHTML = $(MAKEINFO) --html --no-split
  237. -MAINTAINERCLEANFILES = gprofng.info
  238. +man_MANS = gprofng.1
  239. +
  240. +# Build the man page from the texinfo file
  241. +# The sed command removes the no-adjust Nroff command so that
  242. +# the man output looks standard.
  243. +gprofng.1: $(srcdir)/gprofng.texi
  244. + $(AM_V_GEN)touch $@
  245. + $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
  246. + $(AM_V_at)-($(POD2MAN) gprofng.pod | \
  247. + sed -e '/^.if n .na/d' > [email protected] && \
  248. + mv -f [email protected] $@) || (rm -f [email protected] && exit 1)
  249. + $(AM_V_at)rm -f gprofng.pod
  250. +
  251. +MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
  252. +
  253. +info: $(man_MANS)
  254. --- a/gprofng/doc/Makefile.in
  255. +++ b/gprofng/doc/Makefile.in
  256. @@ -182,7 +182,7 @@ am__can_run_installinfo = \
  257. n|no|NO) false;; \
  258. *) (install-info --version) >/dev/null 2>&1;; \
  259. esac
  260. -am__installdirs = "$(DESTDIR)$(infodir)"
  261. +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
  262. am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
  263. am__vpath_adj = case $$p in \
  264. $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
  265. @@ -210,6 +210,9 @@ am__uninstall_files_from_dir = { \
  266. || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
  267. $(am__cd) "$$dir" && rm -f $$files; }; \
  268. }
  269. +man1dir = $(mandir)/man1
  270. +NROFF = nroff
  271. +MANS = $(man_MANS)
  272. am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
  273. am__DIST_COMMON = $(gprofng_TEXINFOS) $(srcdir)/Makefile.in \
  274. $(top_srcdir)/../mkinstalldirs mdate-sh texinfo.tex
  275. @@ -361,11 +364,19 @@ top_srcdir = @top_srcdir@
  276. zlibdir = @zlibdir@
  277. zlibinc = @zlibinc@
  278. AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
  279. +
  280. +# Options to extract the man page
  281. +MANCONF = -Dman
  282. +TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
  283. +POD2MAN = pod2man --center="User Commands" \
  284. + --release="binutils-$(VERSION)" --section=1
  285. +
  286. info_TEXINFOS = gprofng.texi
  287. gprofng_TEXINFOS = fdl.texi
  288. TEXINFO_TEX = .
  289. MAKEINFOHTML = $(MAKEINFO) --html --no-split
  290. -MAINTAINERCLEANFILES = gprofng.info
  291. +man_MANS = gprofng.1
  292. +MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
  293. all: all-am
  294. .SUFFIXES:
  295. @@ -558,6 +569,49 @@ maintainer-clean-aminfo:
  296. echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
  297. rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
  298. done
  299. +install-man1: $(man_MANS)
  300. + @$(NORMAL_INSTALL)
  301. + @list1=''; \
  302. + list2='$(man_MANS)'; \
  303. + test -n "$(man1dir)" \
  304. + && test -n "`echo $$list1$$list2`" \
  305. + || exit 0; \
  306. + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
  307. + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
  308. + { for i in $$list1; do echo "$$i"; done; \
  309. + if test -n "$$list2"; then \
  310. + for i in $$list2; do echo "$$i"; done \
  311. + | sed -n '/\.1[a-z]*$$/p'; \
  312. + fi; \
  313. + } | while read p; do \
  314. + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
  315. + echo "$$d$$p"; echo "$$p"; \
  316. + done | \
  317. + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
  318. + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
  319. + sed 'N;N;s,\n, ,g' | { \
  320. + list=; while read file base inst; do \
  321. + if test "$$base" = "$$inst"; then list="$$list $$file"; else \
  322. + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
  323. + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
  324. + fi; \
  325. + done; \
  326. + for i in $$list; do echo "$$i"; done | $(am__base_list) | \
  327. + while read files; do \
  328. + test -z "$$files" || { \
  329. + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
  330. + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
  331. + done; }
  332. +
  333. +uninstall-man1:
  334. + @$(NORMAL_UNINSTALL)
  335. + @list=''; test -n "$(man1dir)" || exit 0; \
  336. + files=`{ for i in $$list; do echo "$$i"; done; \
  337. + l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
  338. + sed -n '/\.1[a-z]*$$/p'; \
  339. + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
  340. + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
  341. + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
  342. tags TAGS:
  343. ctags CTAGS:
  344. @@ -600,9 +654,9 @@ distdir: $(DISTFILES)
  345. dist-info
  346. check-am: all-am
  347. check: check-am
  348. -all-am: Makefile $(INFO_DEPS)
  349. +all-am: Makefile $(INFO_DEPS) $(MANS)
  350. installdirs:
  351. - for dir in "$(DESTDIR)$(infodir)"; do \
  352. + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
  353. test -z "$$dir" || $(MKDIR_P) "$$dir"; \
  354. done
  355. install: install-am
  356. @@ -652,11 +706,9 @@ html: html-am
  357. html-am: $(HTMLS)
  358. -info: info-am
  359. -
  360. info-am: $(INFO_DEPS)
  361. -install-data-am: install-info-am
  362. +install-data-am: install-info-am install-man
  363. install-dvi: install-dvi-am
  364. @@ -739,7 +791,7 @@ install-info-am: $(INFO_DEPS)
  365. install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
  366. done; \
  367. else : ; fi
  368. -install-man:
  369. +install-man: install-man1
  370. install-pdf: install-pdf-am
  371. @@ -794,7 +846,9 @@ ps: ps-am
  372. ps-am: $(PSS)
  373. uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
  374. - uninstall-pdf-am uninstall-ps-am
  375. + uninstall-man uninstall-pdf-am uninstall-ps-am
  376. +
  377. +uninstall-man: uninstall-man1
  378. .MAKE: install-am install-strip
  379. @@ -804,19 +858,32 @@ uninstall-am: uninstall-dvi-am uninstall
  380. html-am info info-am install install-am install-data \
  381. install-data-am install-dvi install-dvi-am install-exec \
  382. install-exec-am install-html install-html-am install-info \
  383. - install-info-am install-man install-pdf install-pdf-am \
  384. - install-ps install-ps-am install-strip installcheck \
  385. - installcheck-am installdirs maintainer-clean \
  386. + install-info-am install-man install-man1 install-pdf \
  387. + install-pdf-am install-ps install-ps-am install-strip \
  388. + installcheck installcheck-am installdirs maintainer-clean \
  389. maintainer-clean-aminfo maintainer-clean-generic \
  390. maintainer-clean-vti mostlyclean mostlyclean-aminfo \
  391. mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \
  392. pdf-am ps ps-am tags-am uninstall uninstall-am \
  393. uninstall-dvi-am uninstall-html-am uninstall-info-am \
  394. - uninstall-pdf-am uninstall-ps-am
  395. + uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
  396. .PRECIOUS: Makefile
  397. +# Build the man page from the texinfo file
  398. +# The sed command removes the no-adjust Nroff command so that
  399. +# the man output looks standard.
  400. +gprofng.1: $(srcdir)/gprofng.texi
  401. + $(AM_V_GEN)touch $@
  402. + $(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
  403. + $(AM_V_at)-($(POD2MAN) gprofng.pod | \
  404. + sed -e '/^.if n .na/d' > [email protected] && \
  405. + mv -f [email protected] $@) || (rm -f [email protected] && exit 1)
  406. + $(AM_V_at)rm -f gprofng.pod
  407. +
  408. +info: $(man_MANS)
  409. +
  410. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  411. # Otherwise a system limit (for SysV at least) may be exceeded.
  412. .NOEXPORT:
  413. --- a/gprofng/doc/gprofng.texi
  414. +++ b/gprofng/doc/gprofng.texi
  415. @@ -1,5 +1,8 @@
  416. \input texinfo @c -*-texinfo-*-
  417. +@c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
  418. +@c BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
  419. +
  420. @c ----------------------------------------------------------------------------
  421. @c This is the Texinfo source file for the GPROFNG manual.
  422. @c
  423. @@ -59,6 +62,10 @@ gprofng
  424. @cindex \label\, \string\
  425. @end macro
  426. +@macro gcctabopt{body}
  427. +@code{\body\}
  428. +@end macro
  429. +
  430. @c -- Get the version information ---------------------------------------------
  431. @include version.texi
  432. @@ -99,6 +106,20 @@ section entitled ``GNU Free Documentatio
  433. @page
  434. @vskip 0pt plus 1filll
  435. @insertcopying
  436. +
  437. +@c man begin COPYRIGHT
  438. +
  439. +Copyright @copyright{} 2022-2023 Free Software Foundation, Inc.
  440. +
  441. +Permission is granted to copy, distribute and/or modify this document
  442. +under the terms of the GNU Free Documentation License, Version 1.3
  443. +or any later version published by the Free Software Foundation;
  444. +with no Invariant Sections, with no Front-Cover Texts, and with no
  445. +Back-Cover Texts. A copy of the license is included in the
  446. +section entitled ``GNU Free Documentation License''.
  447. +
  448. +@c man end
  449. +
  450. @end titlepage
  451. @c -- Generate the Table of Contents ------------------------------------------
  452. @@ -163,6 +184,154 @@ Terminology
  453. @end menu
  454. @end ifinfo
  455. +@ifset man
  456. +
  457. +@c man title gprofng the driver for the gprofng tool suite
  458. +
  459. +@c man begin SYNOPSIS
  460. +gprofng [OPTION(S)] ACTION [@b{QUALIFIER}] [ARGUMENTS] TARGET
  461. +@c man end
  462. +
  463. +@c man begin DESCRIPTION
  464. +This is the driver for the GPROFNG tools suite to gather and analyze performance data.
  465. +
  466. +The driver executes the action specified. An example of an action is @code{collect}
  467. +to collect performance data. Depending on the action, a qualifier may be needed to
  468. +define the command. Several qualifiers support options. The last item on the command
  469. +is the target the command applies to.
  470. +
  471. +For example, to collect performance data for an application called @code{a.out} and
  472. +store the results in experiment directory @code{mydata.er}, the following command may
  473. +be used:
  474. +
  475. +@smallexample
  476. +$ gprofng collect app -o mydata.er a.out
  477. +@end smallexample
  478. +
  479. +In this example, the action is @code{collect}, the qualifier is @code{app}, the single
  480. +argument is @code{-o mydata.er} and the target is @code{a.out}.
  481. +
  482. +If gprofng is executed without any additional option, action, or target, a usage
  483. +overview is printed.
  484. +
  485. +@c man end
  486. +
  487. +@c man begin OPTIONS
  488. +
  489. +@table @gcctabopt
  490. +
  491. +@item @var{--version}
  492. +print the version number and exit.
  493. +
  494. +@item @var{--help}
  495. +print usage information and exit.
  496. +
  497. +@end table
  498. +
  499. +@c man end
  500. +
  501. +@c man begin NOTES
  502. +
  503. +The gprofng driver supports the following commands.
  504. +
  505. +@c The man pages for the commands below can be viewed using the command name with "gprofng" replaced by "gp" and the spaces replaced by a dash ("-"). For example the man page
  506. +@c name for "gprofng collect app" is "gp-collect-app".
  507. +
  508. +Collect performance data:
  509. +
  510. +@table @code
  511. +
  512. +@item gprofng collect app
  513. +collect application performance data.
  514. +
  515. +@end table
  516. +
  517. +Display the performance results:
  518. +
  519. +@table @code
  520. +
  521. +@item gprofng display text
  522. +display the performance data in ASCII format.
  523. +
  524. +@item gprofng display html
  525. +generate an HTML file from one or more experiments.
  526. +
  527. +@end table
  528. +
  529. +Miscellaneous commands:
  530. +
  531. +@table @code
  532. +
  533. +@item gprofng display src
  534. +display source or disassembly with compiler annotations.
  535. +
  536. +@item gprofng archive
  537. +include binaries and source code in an experiment directory.
  538. +
  539. +@end table
  540. +
  541. +It is also possible to invoke the lower level commands directly, but since
  542. +these are subject to change, in particular the options, we recommend to
  543. +use the driver.
  544. +
  545. +@c man end
  546. +
  547. +@c man begin ENVIRONMENT
  548. +The following environment variables are supported:
  549. +
  550. +@table @code
  551. +
  552. +@item @env{GPROFNG_MAX_CALL_STACK_DEPTH}
  553. +set the depth of the call stack (default is 256).
  554. +
  555. +@item @env{GPROFNG_USE_JAVA_OPTIONS}
  556. +may be set when profiling a C/C++ application that uses dlopen() to execute Java code.
  557. +
  558. +@item @env{GPROFNG_SSH_REMOTE_DISPLAY}
  559. +use this variable to define the ssh command executed by the remote display tool.
  560. +
  561. +@item @env{GPROFNG_SKIP_VALIDATION}
  562. +set this variable to disable checking hardware, system, and Java versions.
  563. +
  564. +@item @env{GPROFNG_ALLOW_CORE_DUMP}
  565. +set this variable to allow a core file to be generated; otherwise an error report is created on /tmp.
  566. +
  567. +@item @env{GPROFNG_ARCHIVE}
  568. +use this variable to define the settings for automatic archiving upon experiment recording completion.
  569. +
  570. +@item @env{GPROFNG_ARCHIVE_COMMON_DIR}
  571. +set this variable to the location of the common archive.
  572. +
  573. +@item @env{GPROFNG_JAVA_MAX_CALL_STACK_DEPTH}
  574. +set the depth of the Java call stack; the default is 256; set to 0 to disable capturing of call stacks.
  575. +
  576. +@item @env{GPROFNG_JAVA_NATIVE_MAX_CALL_STACK_DEPTH}
  577. +set the depth of the Java native call stack; the default is 256; set to 0 to disable capturing of call stacks (JNI and assembly call stacks are not captured).
  578. +
  579. +@end table
  580. +
  581. +@c man end
  582. +
  583. +@c man begin SEEALSO
  584. +The man pages for the various gprofng commands are not available yet, but
  585. +the @option{--help} option supported on each of the commands lists the options
  586. +and provides more information.
  587. +
  588. +For example this displays the options supported on the @command{gprofng collect app}
  589. +command:
  590. +
  591. +@smallexample
  592. +$ gprofng collect app --help
  593. +@end smallexample
  594. +
  595. +The user guide is available as an Info entry for @file{gprofng}.
  596. +@c man end
  597. +
  598. +@end ifset
  599. +
  600. +@c man begin DESCRIPTION
  601. +@c man end
  602. +
  603. @c -- A new node --------------------------------------------------------------
  604. @node Introduction
  605. @chapter Introduction
  606. --- a/gprofng/src/Makefile.am
  607. +++ b/gprofng/src/Makefile.am
  608. @@ -160,7 +160,7 @@ gp_display_text_LDADD = $(LIBGPROFNG) $(
  609. if BUILD_MAN
  610. -man_MANS = gprofng.1 \
  611. +man_MANS = \
  612. gp-archive.1 \
  613. gp-collect-app.1 \
  614. gp-display-src.1 \
  615. @@ -191,10 +191,6 @@ H2M_FILTER = | sed 's/\.TP/\.TP\n.B/' |
  616. | sed 's/See also:/\.SH SEE ALSO/' | sed 's/Documentation:/.SH DOCUMENTATION/' \
  617. | sed 's/Limitations:/.SH LIMITATIONS/'
  618. -gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
  619. - $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
  620. - --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
  621. -
  622. gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
  623. $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
  624. --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
  625. @@ -223,3 +219,5 @@ dist-hook: $(LIBGPROFNG)
  626. install-data-local: install-pkglibLTLIBRARIES
  627. rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
  628. +
  629. +$(srcdir)/DbeSession.cc: QLParser.tab.hh
  630. --- a/gprofng/src/Makefile.in
  631. +++ b/gprofng/src/Makefile.in
  632. @@ -572,7 +572,7 @@ gp_display_src_SOURCES = gp-display-src.
  633. gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
  634. gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc
  635. gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
  636. -@BUILD_MAN_TRUE@man_MANS = gprofng.1 \
  637. +@BUILD_MAN_TRUE@man_MANS = \
  638. @BUILD_MAN_TRUE@ gp-archive.1 \
  639. @BUILD_MAN_TRUE@ gp-collect-app.1 \
  640. @BUILD_MAN_TRUE@ gp-display-src.1 \
  641. @@ -1176,10 +1176,6 @@ uninstall-man: uninstall-man1
  642. QLParser.tab.cc QLParser.tab.hh: QLParser.yy
  643. $(BISON) $^
  644. -@[email protected]: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
  645. -@BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
  646. -@BUILD_MAN_TRUE@ --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
  647. -
  648. @[email protected]: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
  649. @BUILD_MAN_TRUE@ $(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
  650. @BUILD_MAN_TRUE@ --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
  651. @@ -1207,6 +1203,8 @@ dist-hook: $(LIBGPROFNG)
  652. install-data-local: install-pkglibLTLIBRARIES
  653. rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
  654. +$(srcdir)/DbeSession.cc: QLParser.tab.hh
  655. +
  656. # Tell versions [3.59,3.63) of GNU make to not export all variables.
  657. # Otherwise a system limit (for SysV at least) may be exceeded.
  658. .NOEXPORT: