Skip to contentSkip to conversation

Makefile uses $(SCRIPT_PERL) but Documentation/Makefile uses "perl"

BUGLET New Randal L. Schwartz 2 participants 2 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

On my system, that means the two Makefiles actually use two different Perl installations. It'd be best if someone who is smarter at Makefiles than I am would make them work the same. Thanks.

Signature · 4 lines
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
#1 lore raw

PATCH 1/1 Run the specified perl in Documentation/

Makefile uses $(PERL_PATH) but Documentation/Makefile uses "perl"; that means the two Makefiles can use two different Perl installations.

Teach Documentation/Makefile to use PERL_PATH that is exported from the toplevel Makefile, and give a sane fallback for people who run "make" from Documentation directory.

---

* Haven't tested this at all; please Ack or report breakage.

 Documentation/Makefile |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
Documentation/Makefile +6 -3
index d886641..8b19130 100644
@@ -45,6 +45,9 @@ infodir?=$(prefix)/share/info
 MAKEINFO=makeinfo
 INSTALL_INFO=install-info
 DOCBOOK2X_TEXI=docbook2x-texi
+ifndef PERL_PATH
+	PERL_PATH = /usr/bin/perl
+endif
 
 -include ../config.mak.autogen
 -include ../config.mak
@@ -105,7 +108,7 @@ install-info: info
 #
 doc.dep : $(wildcard *.txt) build-docdep.perl
 	$(RM) $@+ $@
-	perl ./build-docdep.perl >$@+
+	$(PERL_PATH) ./build-docdep.perl >$@+
 	mv $@+ $@
 
 -include doc.dep
@@ -124,7 +127,7 @@ $(cmds_txt): cmd-list.made
 
 cmd-list.made: cmd-list.perl $(MAN1_TXT)
 	$(RM) $@
-	perl ./cmd-list.perl
+	$(PERL_PATH) ./cmd-list.perl
 	date >$@
 
 git.7 git.html: git.txt
@@ -161,7 +164,7 @@ user-manual.html: user-manual.xml
 git.info: user-manual.xml
 	$(RM) $@ $*.texi $*.texi+
 	$(DOCBOOK2X_TEXI) user-manual.xml --to-stdout >$*.texi+
-	perl fix-texi.perl <$*.texi+ >$*.texi
+	$(PERL_PATH) fix-texi.perl <$*.texi+ >$*.texi
 	$(MAKEINFO) --no-split $*.texi
 	$(RM) $*.texi $*.texi+