gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 004836f 2/2: Correceted writing of library and


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 004836f 2/2: Correceted writing of library and include dirs for Buildprogram
Date: Fri, 16 Mar 2018 12:46:49 -0400 (EDT)

branch: master
commit 004836fb6ed308ad80ec8cb362ad3be440ce3b81
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Correceted writing of library and include dirs for Buildprogram
    
    When we were writing the user-given library and include directories into
    the BuildProgram configuration file, with the `x"$$i" != x', we were also
    checking if the value within the user's given values wasn't empty! For some
    reason, this causes Mac OS systems to not write the file at all. Even when
    there was no trouble, this appears to also be redundant (Make will already
    remove any white-space character). So this check was removed.
    
    This bug was reported by Johannes Zabl.
---
 bin/buildprog/Makefile.am | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index 7ad07f5..b76dd2e 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -53,26 +53,22 @@ astbuildprog.conf: 
$(top_srcdir)/bin/buildprog/astbuildprog.conf.in
        cp $< $@
        infoadded="no";                                \
        for i in $(IN_CPPFLAGS); do                    \
-          if test x"$$i" != x; then                    \
-           if test $$infoadded = "no"; then           \
-             echo "" >> $@;                           \
-             echo "# Installation information" >> $@; \
-             infoadded="yes";                         \
-           fi;                                        \
-           v=$$(echo $$i | sed -e 's/-I//');          \
-           echo " includedir $$v" >> $@;              \
-          fi;                                          \
+         if test $$infoadded = "no"; then             \
+           echo "" >> $@;                             \
+           echo "# Installation information" >> $@;   \
+           infoadded="yes";                           \
+         fi;                                          \
+         v=$$(echo $$i | sed -e 's/-I//');            \
+         echo " includedir $$v" >> $@;                \
        done;                                          \
        for i in $(IN_LDFLAGS); do                     \
-          if test x"$$i" != x; then                    \
-           if test $$infoadded = "no"; then           \
-             echo "" >> $@;                           \
-             echo "# Installation information" >> $@; \
-             infoadded="yes";                         \
-           fi;                                        \
-           v=$$(echo $$i | sed -e 's/-L//');          \
-           echo " linkdir $$v" >> $@;                 \
+         if test $$infoadded = "no"; then             \
+           echo "" >> $@;                             \
+           echo "# Installation information" >> $@;   \
+           infoadded="yes";                           \
          fi;                                          \
+         v=$$(echo $$i | sed -e 's/-L//');            \
+         echo " linkdir $$v" >> $@;                   \
        done
 
 



reply via email to

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