Makefile rules not considering DESTDIR
Keri Harris <[email protected]> Sun, 22 Jul 2018 13:36:24 +0200
| Newsgroups | gmane.comp.gnu.prolog.bugs |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --------------F5142A4C5B123CC124E6210C Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, There are a number of Makefile rules which test whether the target directory has been set to 'none' by the configure script. If they have been set to 'none' then nothing should be installed. However, these rules do not consider $DESTDIR so it's possible to end up inadvertently installing unwanted files to $DESTDIR/none/. I've attached a patch for this. Thanks Keri --------------F5142A4C5B123CC124E6210C Content-Type: text/x-patch; name="gprolog-1.4.5-destdir.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gprolog-1.4.5-destdir.patch" --- gprolog-1.4.5.orig/src/Makefile.in 2018-07-22 13:29:57.527906923 +0200 +++ gprolog-1.4.5/src/Makefile.in 2018-07-22 13:30:43.492633344 +0200 @@ -82,7 +82,7 @@ # --- Links --- # install-links: - if test $(LINKS_DIR) != none; then \ + if test $(LINKS_DIR) != $(DESTDIR)none; then \ ./mkinstalldirs $(LINKS_DIR); \ (cd $(LINKS_DIR); for i in $(BIN_FILES); do $(LN_S) $(INSTALL_DIR)/bin/$$i .; done); \ fi @@ -97,7 +97,7 @@ # --- Documentation --- # install-doc: - if test $(DOC_DIR) != none; then \ + if test $(DOC_DIR) != $(DESTDIR)none; then \ ./mkinstalldirs $(DOC_DIR); \ (F=`cd ../doc; echo $(DOC_FILES)`; \ for i in $$F; do $(INSTALL_DATA) ../doc/$$i $(DOC_DIR); done); \ @@ -113,7 +113,7 @@ # --- HTML --- # install-html: - if test $(HTML_DIR) != none; then \ + if test $(HTML_DIR) != $(DESTDIR)none; then \ ./mkinstalldirs $(HTML_DIR); \ (F=`cd ../doc/html_node; echo $(HTML_FILES)`; \ for i in $$F; do $(INSTALL_DATA) ../doc/html_node/$$i $(HTML_DIR); done); \ @@ -129,7 +129,7 @@ # --- Examples --- # install-examples: - if test $(EXAMPLES_DIR) != none; then \ + if test $(EXAMPLES_DIR) != $(DESTDIR)none; then \ ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesPl; \ (F=`cd ../examples/ExamplesPl; echo $(EXPL_FILES)`; \ for i in $$F; do $(INSTALL_DATA) ../examples/ExamplesPl/$$i $(EXAMPLES_DIR)/ExamplesPl; done); \ --------------F5142A4C5B123CC124E6210C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-prolog mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-prolog --------------F5142A4C5B123CC124E6210C--