gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 25d2ec5 6/6: bootstrapped/lib only included in


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 25d2ec5 6/6: bootstrapped/lib only included in libraries and utilities
Date: Sun, 11 Sep 2016 13:46:57 +0000 (UTC)

branch: master
commit 25d2ec5fa0bed764ba4a6ba2cdf5eac13d0d27d0
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    bootstrapped/lib only included in libraries and utilities
    
    Gnulib's header files in `bootstrapped/lib' would cause problems when
    testing C++ programs since they were generally included in all compilation
    commands from `configure.ac'! With this commit, these headers are only
    included in the Makefile of utilities and libraries, not when making tests.
    
    In general, since the bootstrapped headers and compiled library are not
    installed, we should not be looking into them for tests (which the user
    will be expecting to work similarly from anywhere on their system). With
    this commit, the old solution to this problem in commit 2d15a91 (CPP
    include directories overwritten) is now removed. This is a much more
    fundamental and elegant solution.
    
    This fixes bug #49007.
---
 configure.ac                |    2 +-
 lib/Makefile.am             |    6 ++++++
 src/TEMPLATE/Makefile.am    |   13 +++++++------
 src/arithmetic/Makefile.am  |   12 ++++++------
 src/convertt/Makefile.am    |   11 ++++++-----
 src/convolve/Makefile.am    |   11 ++++++-----
 src/cosmiccal/Makefile.am   |   11 ++++++-----
 src/header/Makefile.am      |   11 ++++++-----
 src/imgcrop/Makefile.am     |   11 ++++++-----
 src/imgstat/Makefile.am     |   11 ++++++-----
 src/imgwarp/Makefile.am     |   11 ++++++-----
 src/mkcatalog/Makefile.am   |   11 ++++++-----
 src/mknoise/Makefile.am     |   11 ++++++-----
 src/mkprof/Makefile.am      |   12 ++++++------
 src/noisechisel/Makefile.am |   12 ++++++------
 src/subtractsky/Makefile.am |   12 ++++++------
 src/table/Makefile.am       |   12 ++++++------
 tests/Makefile.am           |    1 -
 18 files changed, 98 insertions(+), 83 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7ff9310..e68c95b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,7 +81,7 @@ LT_INIT
 # layers of quotations there.
 CFLAGS="-Wall -O3 $CFLAGS"
 LDFLAGS="-L\$(top_builddir)/lib $LDFLAGS"
-CPPFLAGS="-DSYSCONFIG_DIR=\\\"$sysconfdir\\\" -I\$(top_srcdir)/lib 
-I\$(top_srcdir)/bootstrapped/lib $CPPFLAGS"
+CPPFLAGS="-DSYSCONFIG_DIR=\\\"$sysconfdir\\\" -I\$(top_srcdir)/lib $CPPFLAGS"
 
 
 
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 822d9bf..3923e59 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -19,6 +19,12 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
+
+
 # Define the main compiled library file
 lib_LTLIBRARIES = libgnuastro.la
 
diff --git a/src/TEMPLATE/Makefile.am b/src/TEMPLATE/Makefile.am
index 7eccf85..5aacadd 100644
--- a/src/TEMPLATE/Makefile.am
+++ b/src/TEMPLATE/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.inx
 ##
 ## Original author:
-##          Your name <address@hidden>
+##     Your Name <address@hidden>
 ## Contributing author(s):
 ## Copyright (C) YYYY, Free Software Foundation, Inc.
 ##
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astTEMPLATE_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la                \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = asttable.conf
diff --git a/src/arithmetic/Makefile.am b/src/arithmetic/Makefile.am
index 4cbd672..97a004a 100644
--- a/src/arithmetic/Makefile.am
+++ b/src/arithmetic/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,9 +35,6 @@ astarithmetic_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la      \
 -lgnuastro
 
 
-
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astarithmetic.conf
diff --git a/src/convertt/Makefile.am b/src/convertt/Makefile.am
index e2afb5d..19fd691 100644
--- a/src/convertt/Makefile.am
+++ b/src/convertt/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astconvertt_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la                \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astconvertt.conf
diff --git a/src/convolve/Makefile.am b/src/convolve/Makefile.am
index e255bed..14f1945 100644
--- a/src/convolve/Makefile.am
+++ b/src/convolve/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astconvolve_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la                   \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astconvolve.conf
diff --git a/src/cosmiccal/Makefile.am b/src/cosmiccal/Makefile.am
index 8e49b10..03e46e6 100644
--- a/src/cosmiccal/Makefile.am
+++ b/src/cosmiccal/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astcosmiccal_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la               \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astcosmiccal.conf
diff --git a/src/header/Makefile.am b/src/header/Makefile.am
index 59a1415..d98b594 100644
--- a/src/header/Makefile.am
+++ b/src/header/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astheader_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la  
        \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astheader.conf
diff --git a/src/imgcrop/Makefile.am b/src/imgcrop/Makefile.am
index e5d7202..4552260 100644
--- a/src/imgcrop/Makefile.am
+++ b/src/imgcrop/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astimgcrop_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la 
\
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.ma
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.ma
 dist_sysconf_DATA = astimgcrop.conf
diff --git a/src/imgstat/Makefile.am b/src/imgstat/Makefile.am
index 6b0b094..99c5f75 100644
--- a/src/imgstat/Makefile.am
+++ b/src/imgstat/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astimgstat_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la 
        \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astimgstat.conf
diff --git a/src/imgwarp/Makefile.am b/src/imgwarp/Makefile.am
index 6b0ffdb..8ce76e2 100644
--- a/src/imgwarp/Makefile.am
+++ b/src/imgwarp/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astimgwarp_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la 
        \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astimgwarp.conf
diff --git a/src/mkcatalog/Makefile.am b/src/mkcatalog/Makefile.am
index 771961a..161a944 100644
--- a/src/mkcatalog/Makefile.am
+++ b/src/mkcatalog/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astmkcatalog_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la       \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astmkcatalog.conf
diff --git a/src/mknoise/Makefile.am b/src/mknoise/Makefile.am
index 1f46728..37c8558 100644
--- a/src/mknoise/Makefile.am
+++ b/src/mknoise/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,8 +35,6 @@ astmknoise_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la 
        \
 -lgnuastro
 
 
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astmknoise.conf
diff --git a/src/mkprof/Makefile.am b/src/mkprof/Makefile.am
index c238b82..d3c5717 100644
--- a/src/mkprof/Makefile.am
+++ b/src/mkprof/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 # Utility and its sources
@@ -32,9 +35,6 @@ astmkprof_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la  
          \
 -lgnuastro
 
 
-
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astmkprof.conf
diff --git a/src/noisechisel/Makefile.am b/src/noisechisel/Makefile.am
index 64dbbe4..b3e3d4d 100644
--- a/src/noisechisel/Makefile.am
+++ b/src/noisechisel/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -34,9 +37,6 @@ astnoisechisel_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la     \
 -lgnuastro
 
 
-
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astnoisechisel.conf
diff --git a/src/subtractsky/Makefile.am b/src/subtractsky/Makefile.am
index a00635b..56be351 100644
--- a/src/subtractsky/Makefile.am
+++ b/src/subtractsky/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,9 +35,6 @@ astsubtractsky_LDADD = 
$(top_builddir)/bootstrapped/lib/libgnu.la     \
 -lgnuastro
 
 
-
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = astsubtractsky.conf
diff --git a/src/table/Makefile.am b/src/table/Makefile.am
index fb72dc0..2a0ecc7 100644
--- a/src/table/Makefile.am
+++ b/src/table/Makefile.am
@@ -19,7 +19,10 @@
 ## along with Gnuastro. If not, see <http://www.gnu.org/licenses/>.
 
 
-
+## Necessary flags. NOTE: $(top_srcdir)/bootstrapped/lib is only necessary
+## for internally compiled utilities and libraries. It must not be included
+## during the tests since the bootstrapped libraries are not installed.
+AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
 
 
 ## Utility and its sources
@@ -32,9 +35,6 @@ asttable_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la   
          \
 -lgnuastro
 
 
-
-
-
-# To destribute the defaults file.
-# NOTE: the man page is created in doc/Makefile.am
+## The configuration file (distribute and install).
+## NOTE: the man page is created in doc/Makefile.am
 dist_sysconf_DATA = asttable.conf
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ce77fe0..1ece32d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -47,7 +47,6 @@ export hasghostscript=$(MAYBE_HASGHOSTSCRIPT);
 
 # Compilations that are to be done with `make check'.
 LDADD = -lgnuastro
-CPPFLAGS = -I$(top_srcdir)/lib
 check_PROGRAMS = versionc versioncpp
 versionc_SOURCES = lib/versionc.c
 versioncpp_SOURCES = lib/versioncpp.cpp



reply via email to

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