gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] (no subject)


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] (no subject)
Date: Mon, 30 May 2016 08:21:59 +0000 (UTC)

branch: master
commit d143ba2b384cc54ce8c6c569b98488436bcac310
Author: Mohammad Akhlaghi <address@hidden>
Date:   Mon May 30 15:50:07 2016 +0900

    Man pages can be made in parallel
    
    Until now, the man pages did not depend on the actual executable of each
    utility. Therefore, when run in parallel, they would be build along side
    the utility and all its sources, and therefore would fail (since `help2man'
    needs the executable). With this commit, the executable is also a
    dependency of the Man page, so there won't be any problem in parallel
    builds.
    
    `help2man' is run by calling the executable string along with the two
    `--output' and `--source' options. Their order does not matter. So in this
    update, they were ordered such that the `--source' option (which can be
    long) is in a new line. This makes it much more likely for both lines to
    fit nicely in an 80-character wide terminal emulator.
    
    Since the man page is now dependent on the executable, it is also be built
    in the build directory (when `help2man' is present), but it is not cleaned,
    so it was also added to Automake's `CLEANFILE' variable (without this,
    `make distcheck' would fail).
---
 src/arithmetic/Makefile.am  |   17 ++++++++++++++---
 src/convertt/Makefile.am    |   18 ++++++++++++++----
 src/convolve/Makefile.am    |   17 ++++++++++++++---
 src/cosmiccal/Makefile.am   |   17 ++++++++++++++---
 src/header/Makefile.am      |   17 ++++++++++++++---
 src/imgcrop/Makefile.am     |   17 ++++++++++++++---
 src/imgstat/Makefile.am     |   17 ++++++++++++++---
 src/imgwarp/Makefile.am     |   17 ++++++++++++++---
 src/mkcatalog/Makefile.am   |   17 ++++++++++++++---
 src/mknoise/Makefile.am     |   17 ++++++++++++++---
 src/mkprof/Makefile.am      |   17 +++++++++++++++--
 src/noisechisel/Makefile.am |   17 ++++++++++++++---
 src/subtractsky/Makefile.am |   15 +++++++++++++--
 13 files changed, 182 insertions(+), 38 deletions(-)

diff --git a/src/arithmetic/Makefile.am b/src/arithmetic/Makefile.am
index 875c9a6..1734929 100644
--- a/src/arithmetic/Makefile.am
+++ b/src/arithmetic/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astarithmetic
 
 astarithmetic_SOURCES = main.c main.h cite.h ui.c ui.h args.h  \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astarithmetic.conf
 ## Generally for the man pages:
 dist_man_MANS = astarithmetic.1
 
-astarithmetic.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astarithmetic
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astarithmetic.1: astarithmetic$(EXEEXT) args.h                        \
+                 $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astarithmetic$(EXEEXT)             \
+                     --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astarithmetic.1
diff --git a/src/convertt/Makefile.am b/src/convertt/Makefile.am
index 66383b8..8999d6f 100644
--- a/src/convertt/Makefile.am
+++ b/src/convertt/Makefile.am
@@ -43,8 +43,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ConvertType:
-
+## Utility and its sources
 bin_PROGRAMS = astconvertt
 
 astconvertt_SOURCES = main.c main.h args.h cite.h ui.c ui.h eps.c      \
@@ -68,5 +67,16 @@ dist_sysconf_DATA = astconvertt.conf
 ## Generally for the man pages:
 dist_man_MANS = astconvertt.1
 
-astconvertt.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astconvertt
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astconvertt.1: astconvertt$(EXEEXT) args.h                             \
+               $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astconvertt$(EXEEXT)                \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astconvertt.1
diff --git a/src/convolve/Makefile.am b/src/convolve/Makefile.am
index 1e60893..46b75de 100644
--- a/src/convolve/Makefile.am
+++ b/src/convolve/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astconvolve
 
 astconvolve_SOURCES = main.c main.h args.h ui.c ui.h convolve.c        \
@@ -57,5 +57,16 @@ dist_sysconf_DATA = astconvolve.conf
 ## Generally for the man pages:
 dist_man_MANS = astconvolve.1
 
-astconvolve.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astconvolve
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astconvolve.1: astconvolve$(EXEEXT) args.h                             \
+               $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astconvolve$(EXEEXT)                \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astconvolve.1
diff --git a/src/cosmiccal/Makefile.am b/src/cosmiccal/Makefile.am
index 6f5d7b0..f3e0bbc 100644
--- a/src/cosmiccal/Makefile.am
+++ b/src/cosmiccal/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astcosmiccal
 
 astcosmiccal_SOURCES = main.c main.h cite.h ui.c ui.h args.h   \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astcosmiccal.conf
 ## Generally for the man pages:
 dist_man_MANS = astcosmiccal.1
 
-astcosmiccal.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astcosmiccal
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astcosmiccal.1: astcosmiccal$(EXEEXT) args.h                          \
+                $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astcosmiccal$(EXEEXT)              \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astcosmiccal.1
diff --git a/src/header/Makefile.am b/src/header/Makefile.am
index 874e8e1..5761cbe 100644
--- a/src/header/Makefile.am
+++ b/src/header/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astheader
 
 astheader_SOURCES = main.c main.h cite.h ui.c ui.h args.h      \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astheader.conf
 ## Generally for the man pages:
 dist_man_MANS = astheader.1
 
-astheader.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astheader
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astheader.1: astheader$(EXEEXT) args.h                                \
+             $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astheader$(EXEEXT)                 \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astheader.1
diff --git a/src/imgcrop/Makefile.am b/src/imgcrop/Makefile.am
index 555db6d..83ae7bf 100644
--- a/src/imgcrop/Makefile.am
+++ b/src/imgcrop/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astimgcrop
 
 astimgcrop_SOURCES = main.c main.h cite.h ui.c ui.h args.h imgcrop.c   \
@@ -56,5 +56,16 @@ dist_sysconf_DATA = astimgcrop.conf
 ## Generally for the man pages:
 dist_man_MANS = astimgcrop.1
 
-astimgcrop.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astimgcrop
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astimgcrop.1: astimgcrop$(EXEEXT) args.h                              \
+              $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astimgcrop$(EXEEXT)                \
+                     --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astimgcrop.1
diff --git a/src/imgstat/Makefile.am b/src/imgstat/Makefile.am
index e6f4cbd..1a2da92 100644
--- a/src/imgstat/Makefile.am
+++ b/src/imgstat/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astimgstat
 
 astimgstat_SOURCES = main.c main.h cite.h ui.c ui.h args.h     \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astimgstat.conf
 ## Generally for the man pages:
 dist_man_MANS = astimgstat.1
 
-astimgstat.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astimgstat
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astimgstat.1: astimgstat$(EXEEXT) args.h                              \
+              $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astimgstat$(EXEEXT)                \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astimgstat.1
diff --git a/src/imgwarp/Makefile.am b/src/imgwarp/Makefile.am
index 48db3b5..7e8025e 100644
--- a/src/imgwarp/Makefile.am
+++ b/src/imgwarp/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astimgwarp
 
 astimgwarp_SOURCES = main.c main.h cite.h ui.c ui.h args.h     \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astimgwarp.conf
 ## Generally for the man pages:
 dist_man_MANS = astimgwarp.1
 
-astimgwarp.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astimgwarp
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astimgwarp.1: astimgwarp$(EXEEXT) args.h                              \
+              $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astimgwarp$(EXEEXT)                \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astimgwarp.1
diff --git a/src/mkcatalog/Makefile.am b/src/mkcatalog/Makefile.am
index 4b05d96..9ab0505 100644
--- a/src/mkcatalog/Makefile.am
+++ b/src/mkcatalog/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astmkcatalog
 
 astmkcatalog_SOURCES = main.c main.h cite.h ui.c ui.h args.h   \
@@ -58,5 +58,16 @@ dist_sysconf_DATA = astmkcatalog.conf
 ## Generally for the man pages:
 dist_man_MANS = astmkcatalog.1
 
-astmkcatalog.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astmkcatalog
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astmkcatalog.1: astmkcatalog$(EXEEXT) args.h                        \
+                $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astmkcatalog$(EXEEXT)            \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astmkcatalog.1
diff --git a/src/mknoise/Makefile.am b/src/mknoise/Makefile.am
index 9ec103d..9f5022c 100644
--- a/src/mknoise/Makefile.am
+++ b/src/mknoise/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astmknoise
 
 astmknoise_SOURCES = main.c main.h cite.h ui.c ui.h args.h     \
@@ -57,5 +57,16 @@ dist_sysconf_DATA = astmknoise.conf
 ## Generally for the man pages:
 dist_man_MANS = astmknoise.1
 
-astmknoise.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astmknoise
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astmknoise.1: astmknoise$(EXEEXT) args.h                            \
+              $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astmknoise$(EXEEXT)              \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astmknoise.1
diff --git a/src/mkprof/Makefile.am b/src/mkprof/Makefile.am
index 42f113e..16f7cfa 100644
--- a/src/mkprof/Makefile.am
+++ b/src/mkprof/Makefile.am
@@ -33,6 +33,8 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
+
+# Utility and its sources
 bin_PROGRAMS = astmkprof
 
 astmkprof_SOURCES = main.c main.h ui.c ui.h mkprof.c mkprof.h args.h   \
@@ -55,5 +57,16 @@ dist_sysconf_DATA = astmkprof.conf
 ## Generally for the man pages:
 dist_man_MANS = astmkprof.1
 
-astmkprof.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astmkprof
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astmkprof.1: astmkprof$(EXEEXT) args.h                                \
+             $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astmkprof$(EXEEXT)                 \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astmkprof.1
diff --git a/src/noisechisel/Makefile.am b/src/noisechisel/Makefile.am
index 9a54c00..ad12f83 100644
--- a/src/noisechisel/Makefile.am
+++ b/src/noisechisel/Makefile.am
@@ -34,7 +34,7 @@ AM_CPPFLAGS = -DSYSCONFIG_DIR=\"$(sysconfdir)\" 
-I$(top_srcdir)/lib   \
 
 
 
-## ImageCrop:
+## Utility and its sources
 bin_PROGRAMS = astnoisechisel
 
 astnoisechisel_SOURCES = main.c main.h cite.h ui.c ui.h args.h         \
@@ -61,5 +61,16 @@ dist_sysconf_DATA = astnoisechisel.conf
 ## Generally for the man pages:
 dist_man_MANS = astnoisechisel.1
 
-astnoisechisel.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astnoisechisel
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astnoisechisel.1: astnoisechisel$(EXEEXT) args.h                        \
+                  $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astnoisechisel$(EXEEXT)              \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astnoisechisel.1
diff --git a/src/subtractsky/Makefile.am b/src/subtractsky/Makefile.am
index a7667f6..c198f41 100644
--- a/src/subtractsky/Makefile.am
+++ b/src/subtractsky/Makefile.am
@@ -59,5 +59,16 @@ dist_sysconf_DATA = astsubtractsky.conf
 ## Generally for the man pages:
 dist_man_MANS = astsubtractsky.1
 
-astsubtractsky.1: args.h $(top_srcdir)/lib/gnuastro/commonargs.h
-       -$(HELP2MAN) --output=$@ --source="$(PACKAGE_STRING)" ./astsubtractsky
+## Note that in parallel builds, we want to make sure that the man page is
+## only created once the executable is built, so the argument to
+## bin_PROGRAMS is a prerequisite here, the $(EXEEXT) is used in
+## Makefile.in.
+astsubtractsky.1: astsubtractsky$(EXEEXT) args.h                       \
+                  $(top_srcdir)/lib/gnuastro/commonargs.h
+       -$(HELP2MAN) --output=$@ ./astsubtractsky$(EXEEXT)             \
+                    --source="$(PACKAGE_STRING)"
+
+# With the addition of the executable as a dependency for the man page, the
+# (possibly) produced man page will not be cleaned. So we have to ask for
+# its cleaning manually here.
+CLEANFILES = $(builddir)/astsubtractsky.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]