gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 6aa5734 1/2: BuildProgram's configuration file


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 6aa5734 1/2: BuildProgram's configuration file start created with cat
Date: Thu, 26 Jul 2018 08:33:38 -0400 (EDT)

branch: master
commit 6aa57344cf2f88f3a7320080ab3adaf1e15552d5
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    BuildProgram's configuration file start created with cat
    
    Until now, we would first use `cp' to copy the top of BuildProgram's
    configuration file into the build directory, then append the `-I' and `-L'
    options to it. But while running `make distcheck' I noticed that the `cp'
    will preserve the permissions of the source file and will thus crash the
    build when the builder doesn't have write permissions on the source.
    
    So with this commit, instead of using `cp', the top of BuildProgram's
    configuration file is read with `cat', then it is redirected to the new
    configuration file for the later steps to append to.
---
 bin/buildprog/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index 58d9b03..3f8f33e 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -59,7 +59,7 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h buildprog.h 
astbuildprog.conf.in
 # will change between the two (the `-I' or `-L' have been removed), so it
 # shouldn't be the same.
 astbuildprog.conf: $(top_srcdir)/bin/buildprog/astbuildprog.conf.in
-       cp $< $@
+       cat $< > $@
        infoadded="no";                                \
        for i in $(CPPFLAGS); do                       \
          v=$$(echo $$i | sed -e 's/^-I//');           \



reply via email to

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