gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 7fa722d 1/3: Better management in Makefile.am


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 7fa722d 1/3: Better management in Makefile.am and lib/Makefile.am
Date: Sun, 18 Sep 2016 20:23:50 +0000 (UTC)

branch: master
commit 7fa722d9de6646c138bc7ae623c39ed4267f8e19
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Better management in Makefile.am and lib/Makefile.am
    
    These two Makefiles were edited to be more clear and uniform:
    
      - The library header files that were part of `EXTRA_DIST' in
        `Makefile.am', are now in the `EXTRA_DIST' of `lib/Makefile.am'.
    
      - In `lib/Makefile.am', `gnuastro/gnuastro.h' is no longer a
        `BUILT_SOURCES', because it should not be used within Gnuastro.
---
 Makefile.am     |   63 ++++++++++++++++++++++++++++---------------------------
 lib/Makefile.am |   36 ++++++++++++++++++-------------
 2 files changed, 54 insertions(+), 45 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 1c819fa..952fbe6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,8 +40,6 @@ BUILT_SOURCES = $(top_srcdir)/AUTHORS
 
 
 
-
-
 ## Directories to check:
 ## =====================
 ##
@@ -98,17 +96,22 @@ if COND_GNULIBCHECK
   MAYBE_GNULIBCHECK = bootstrapped/tests
 endif
 
-# Note that by default `COND_TEMPLATE' is not set in configure, it is
-# commented, and exists only as a template for you to copy and paste to
-# name your new utility. The same rule is applied here (in the `if'
-# conditions above). When `MAYBE_TEMPLATE' is not defined, then Make
-# will see it as a blank string and igonore it, so there is no problem with
-# having an uncommented `MAYBE_TEMPLATE' as a value in `SUBDIRS'.
-SUBDIRS = bootstrapped/lib $(MAYBE_GNULIBCHECK) lib $(MAYBE_ARITHMETIC)     \
-$(MAYBE_CONVERTT) $(MAYBE_CONVOLVE) $(MAYBE_COSMICCAL) $(MAYBE_HEADER)      \
-$(MAYBE_IMGCROP) $(MAYBE_IMGSTAT) $(MAYBE_IMGWARP) $(MAYBE_MKCATALOG)       \
-$(MAYBE_MKNOISE) $(MAYBE_MKPROF) $(MAYBE_NOISECHISEL) $(MAYBE_SUBTRACTSKY)  \
-$(MAYBE_TABLE) $(MAYBE_TEMPLATE) doc tests
+
+
+## Subdirectories to build
+## =======================
+##
+## Note that by default `COND_TEMPLATE' is not set in configure, it is
+## commented, and exists only as a template for you to copy and paste to
+## name your new utility. The same rule is applied here (in the `if'
+## conditions above). When `MAYBE_TEMPLATE' is not defined, then Make will
+## see it as a blank string and igonore it, so there is no problem with
+## having an uncommented `MAYBE_TEMPLATE' as a value in `SUBDIRS'.
+SUBDIRS = bootstrapped/lib $(MAYBE_GNULIBCHECK) lib $(MAYBE_ARITHMETIC)    \
+  $(MAYBE_CONVERTT) $(MAYBE_CONVOLVE) $(MAYBE_COSMICCAL) $(MAYBE_HEADER)   \
+  $(MAYBE_IMGCROP) $(MAYBE_IMGSTAT) $(MAYBE_IMGWARP) $(MAYBE_MKCATALOG)    \
+  $(MAYBE_MKNOISE) $(MAYBE_MKPROF) $(MAYBE_NOISECHISEL)                    \
+  $(MAYBE_SUBTRACTSKY) $(MAYBE_TABLE) $(MAYBE_TEMPLATE) doc tests
 
 
 
@@ -127,10 +130,8 @@ dist_doc_DATA = README
 ## Files that are only distributed
 ## ===============================
 EXTRA_DIST = bootstrap bootstrap.conf genauthors .dir-locals.el .version   \
-             tmpfs-config-make bootstrapped/m4/gnulib-cache.m4             \
-             bootstrapped/README .autom4te.cfg lib/gnuastro/commonargs.h   \
-             lib/gnuastro/commonparams.h lib/gnuastro/fixedstringmacros.h  \
-             lib/gnuastro/neighbors.h lib/gnuastro/README
+  tmpfs-config-make bootstrapped/m4/gnulib-cache.m4 bootstrapped/README    \
+  .autom4te.cfg
 
 
 
@@ -165,17 +166,17 @@ all-local:
         echo;                                                                  
     \
        fi
 
-# We cannot do the writing persmission test at configure time. Here is a
-# quote from the generated ./configure script: The prefix variables...
-#
-#   "... are left unexpanded so users can "make install exec_prefix=/foo"
-#   and all the variables that are supposed to be based on exec_prefix by
-#   default will actually change."
-#
-# So actually, they can also do that after `make check'. Usually
-# professional users would want to do such a thing, so they can ignore the
-# NOTE. This note is mostly for beginners and it is not written to convey
-# that this is the ONLY solution.
+## We cannot do the writing persmission test at configure time. Here is a
+## quote from the generated ./configure script: The prefix variables...
+##
+##   "... are left unexpanded so users can "make install exec_prefix=/foo"
+##   and all the variables that are supposed to be based on exec_prefix by
+##   default will actually change."
+##
+## So actually, they can also do that after `make check'. Usually
+## professional users would want to do such a thing, so they can ignore the
+## NOTE. This note is mostly for beginners and it is not written to convey
+## that this is the ONLY solution.
 check-local:
        @if [ x$(GUIDEMESSAGE) = xyes ]; then                                   
     \
         echo;                                                                  
     \
@@ -205,9 +206,9 @@ check-local:
         echo;                                                                  
     \
        fi
 
-# Note that the `\' characters in the GNU head here are not printed on the
-# command line. So we have to consider them. The ASCII GNU head is taken
-# from: https://www.gnu.org/graphics/gnu-ascii.html
+## Note that the `\' characters in the GNU head here are not printed on the
+## command line. So we have to consider them. The ASCII GNU head is taken
+## from: https://www.gnu.org/graphics/gnu-ascii.html
 install-exec-local:
        @if [ x$(GUIDEMESSAGE) = xyes ]; then                                   
     \
         echo;                                                                  
     \
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 549e2f0..965390c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -31,30 +31,38 @@ libgnuastro_la_LDFLAGS = -version-info $(GAL_LT_VERSION)
 
 
 # Specify the library .c files
-BUILT_SOURCES = gnuastro/gnuastro.h
-libgnuastro_la_SOURCES = array.c box.c checkset.c configfiles.c fits.c  \
-  linkedlist.c mesh.c mode.c polygon.c qsort.c spatialconvolve.c        \
+libgnuastro_la_SOURCES = array.c box.c checkset.c configfiles.c fits.c \
+  linkedlist.c mesh.c mode.c polygon.c qsort.c spatialconvolve.c       \
   statistics.c threads.c timing.c txtarray.c wcs.c
 
 
-# Specify the installed headers, note that we are not blindly including all
-# `.h' files in the $(headersdir) directory. Some of the header files don't
-# need to be installed.
-headersdir=$(top_srcdir)/lib/gnuastro
+# Installed headers, note that we are not blindly including all `.h' files
+# in the $(headersdir) directory. Some of the header files don't need to be
+# installed.
 pkginclude_HEADERS = gnuastro/gnuastro.h $(headersdir)/array.h             \
-  $(headersdir)/box.h $(headersdir)/checkset.h $(headersdir)/configfiles.h \
-  $(headersdir)/fits.h $(headersdir)/linkedlist.h $(headersdir)/mesh.h     \
-  $(headersdir)/mode.h $(headersdir)/polygon.h $(headersdir)/qsort.h       \
-  $(headersdir)/spatialconvolve.h $(headersdir)/statistics.h               \
-  $(headersdir)/threads.h $(headersdir)/timing.h $(headersdir)/txtarray.h  \
-  $(headersdir)/wcs.h
+  $(headersdir)/box.h $(headersdir)/fits.h $(headersdir)/linkedlist.h      \
+  $(headersdir)/mesh.h $(headersdir)/mode.h $(headersdir)/polygon.h        \
+  $(headersdir)/qsort.h $(headersdir)/spatialconvolve.h                    \
+  $(headersdir)/statistics.h $(headersdir)/threads.h $(headersdir)/wcs.h   \
+  $(headersdir)/txtarray.h
+
+
+# Files to distribute in the tarball. For the headers: these are internal
+# headers and don't need to be installed. Headers are only mentioned within
+# the source files, and if they are not explicitly mentioned somewhere in
+# the Makefile, they will not distributed, so we need to explicitly tell
+# Automake to distribute them here.
+headersdir=$(top_srcdir)/lib/gnuastro
+EXTRA_DIST = gnuastro.pc.in gnuastro.h.in $(headersdir)/commonargs.h       \
+  $(headersdir)/commonparams.h $(headersdir)/fixedstringmacros.h           \
+  $(headersdir)/neighbors.h $(headersdir)/checkset.h                       \
+  $(headersdir)/configfiles.h $(headersdir)/timing.h $(headersdir)/README
 
 
 # Definitions for Gnuastro's the pkg-config file (inspired from GSL's
 # Makefile.am)
 pkgconfig_DATA = gnuastro.pc
 pkgconfigdir = $(libdir)/pkgconfig
-EXTRA_DIST = gnuastro.pc.in gnuastro.h.in
 CLEANFILES = gnuastro.pc gnuastro/gnuastro.h
 
 



reply via email to

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