From 97966e6d65bd3d450f12c7bb41af5f9eafd35a60 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 16 Mar 2016 12:53:55 -0500 Subject: build: Do not remake doc/guix.1. * doc.am (doc/guix.1): Do not depend on $(sub_commands_mans) which will always appear out-of-date. --- doc.am | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc.am') diff --git a/doc.am b/doc.am index 127029c1ca..a1eabadfff 100644 --- a/doc.am +++ b/doc.am @@ -129,8 +129,12 @@ HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) # Note: Do not depend on 'scripts/guix' since that would trigger a rebuild # even for people building from a tarball. -doc/guix.1: $(sub_commands_mans) - -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` +doc/guix.1: scripts/guix.in $(GOBJECTS) + -@case '$?' in \ + *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ + $(gen_man) --output="$@" "guix";; \ + *) : ;; \ + esac # Note: The dependency on $(GOBJECTS) is meant to force these docs to be made # only after all Guile modules have been compiled. The 'case' ensures the man -- cgit v1.2.3 From 92d40a68f4b14f2527785ffc1ae2e5bf7bb2f200 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 19 Mar 2016 15:41:04 +0100 Subject: Revert "build: Do not remake doc/guix.1." This reverts commit 97966e6d65bd3d450f12c7bb41af5f9eafd35a60. --- doc.am | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'doc.am') diff --git a/doc.am b/doc.am index a1eabadfff..127029c1ca 100644 --- a/doc.am +++ b/doc.am @@ -129,12 +129,8 @@ HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) # Note: Do not depend on 'scripts/guix' since that would trigger a rebuild # even for people building from a tarball. -doc/guix.1: scripts/guix.in $(GOBJECTS) - -@case '$?' in \ - *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ - $(gen_man) --output="$@" "guix";; \ - *) : ;; \ - esac +doc/guix.1: $(sub_commands_mans) + -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` # Note: The dependency on $(GOBJECTS) is meant to force these docs to be made # only after all Guile modules have been compiled. The 'case' ensures the man -- cgit v1.2.3 From 83e79a134df63ca7c3045d3c46b0bc0e05149ab7 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 19 Mar 2016 15:49:20 +0100 Subject: build: Make 'guix' man page depend on scripts/guix.in. * doc.am (doc/guix.1): Add scripts/guix.in prerequisite. --- doc.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc.am') diff --git a/doc.am b/doc.am index 127029c1ca..896139f042 100644 --- a/doc.am +++ b/doc.am @@ -129,7 +129,7 @@ HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) # Note: Do not depend on 'scripts/guix' since that would trigger a rebuild # even for people building from a tarball. -doc/guix.1: $(sub_commands_mans) +doc/guix.1: scripts/guix.in $(sub_commands_mans) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` # Note: The dependency on $(GOBJECTS) is meant to force these docs to be made -- cgit v1.2.3 From b33d3a5a94c043e8fa9a039033bd6c58a28d3316 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 19 Mar 2016 14:27:21 +0100 Subject: build: Build man pages in $(srcdir). Before that the doc/guix.1 rule was always triggered when doing a VPATH build from a tarball. * doc.am (sub_commands_mans, dist_man1_MANS): man pages are now generated in $(srcdir) like the info manual. (doc/guix.1, doc/guix-%.1): Prepend $(srcdir) to target name. [BUILD_DAEMON] (doc/guix-daemon.1): Likewise. --- doc.am | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'doc.am') diff --git a/doc.am b/doc.am index 896139f042..956ac1fd5a 100644 --- a/doc.am +++ b/doc.am @@ -99,25 +99,25 @@ dvi-local: ps-local ## ----------- ## sub_commands_mans = \ - doc/guix-archive.1 \ - doc/guix-build.1 \ - doc/guix-challenge.1 \ - doc/guix-download.1 \ - doc/guix-edit.1 \ - doc/guix-environment.1 \ - doc/guix-gc.1 \ - doc/guix-hash.1 \ - doc/guix-import.1 \ - doc/guix-lint.1 \ - doc/guix-package.1 \ - doc/guix-publish.1 \ - doc/guix-pull.1 \ - doc/guix-refresh.1 \ - doc/guix-size.1 \ - doc/guix-system.1 + $(srcdir)/doc/guix-archive.1 \ + $(srcdir)/doc/guix-build.1 \ + $(srcdir)/doc/guix-challenge.1 \ + $(srcdir)/doc/guix-download.1 \ + $(srcdir)/doc/guix-edit.1 \ + $(srcdir)/doc/guix-environment.1 \ + $(srcdir)/doc/guix-gc.1 \ + $(srcdir)/doc/guix-hash.1 \ + $(srcdir)/doc/guix-import.1 \ + $(srcdir)/doc/guix-lint.1 \ + $(srcdir)/doc/guix-package.1 \ + $(srcdir)/doc/guix-publish.1 \ + $(srcdir)/doc/guix-pull.1 \ + $(srcdir)/doc/guix-refresh.1 \ + $(srcdir)/doc/guix-size.1 \ + $(srcdir)/doc/guix-system.1 dist_man1_MANS = \ - doc/guix.1 \ + $(srcdir)/doc/guix.1 \ $(sub_commands_mans) # Man pages are generated using GNU help2man. @@ -129,14 +129,14 @@ HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) # Note: Do not depend on 'scripts/guix' since that would trigger a rebuild # even for people building from a tarball. -doc/guix.1: scripts/guix.in $(sub_commands_mans) +$(srcdir)/doc/guix.1: scripts/guix.in $(sub_commands_mans) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` # Note: The dependency on $(GOBJECTS) is meant to force these docs to be made # only after all Guile modules have been compiled. The 'case' ensures the man # pages are only generated if the corresponding script source has been # changed. -doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS) +$(srcdir)/doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS) -@case '$?' in \ *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ $(gen_man) --output="$@" "guix $*";; \ @@ -145,11 +145,11 @@ doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS) if BUILD_DAEMON -dist_man1_MANS += doc/guix-daemon.1 +dist_man1_MANS += $(srcdir)/doc/guix-daemon.1 # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even # for people building from a tarball. -doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc +$(srcdir)/doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` endif -- cgit v1.2.3 From 39118b5eed53725dcd3feb61dc6cde5f98929579 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 19 Mar 2016 15:27:54 +0100 Subject: build: Rewrite comments for man pages. * doc.am : Rewrite comments to describe the build process and the meaning of the noticeable idiosyncrasies in a more general way. --- doc.am | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'doc.am') diff --git a/doc.am b/doc.am index 956ac1fd5a..8356ffa2dd 100644 --- a/doc.am +++ b/doc.am @@ -98,6 +98,12 @@ dvi-local: ps-local ## Man pages. ## ## ----------- ## +# The man pages are generated using GNU Help2man. In makefiles rules they +# depend not on the binary, but on the source files. This usage allows a +# manual page to be generated by the maintainer and included in the +# distribution without requiring the end-user to have 'help2man' installed. +# They are built in $(srcdir) like info manuals. + sub_commands_mans = \ $(srcdir)/doc/guix-archive.1 \ $(srcdir)/doc/guix-build.1 \ @@ -120,22 +126,19 @@ dist_man1_MANS = \ $(srcdir)/doc/guix.1 \ $(sub_commands_mans) -# Man pages are generated using GNU help2man. gen_man = \ LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \ $(HELP2MANFLAGS) HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME) -# Note: Do not depend on 'scripts/guix' since that would trigger a rebuild -# even for people building from a tarball. $(srcdir)/doc/guix.1: scripts/guix.in $(sub_commands_mans) -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` -# Note: The dependency on $(GOBJECTS) is meant to force these docs to be made -# only after all Guile modules have been compiled. The 'case' ensures the man -# pages are only generated if the corresponding script source has been -# changed. +# The 'case' ensures the man pages are only generated if the corresponding +# source script (the first prerequisite) has been changed. The $(GOBJECTS) +# prerequisite is solely meant to force these docs to be made only after all +# Guile modules have been compiled. $(srcdir)/doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS) -@case '$?' in \ *$<*) $(AM_V_P) && set -x || echo " HELP2MAN $@"; \ @@ -147,8 +150,6 @@ if BUILD_DAEMON dist_man1_MANS += $(srcdir)/doc/guix-daemon.1 -# Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even -# for people building from a tarball. $(srcdir)/doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1` -- cgit v1.2.3