]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/stepmake/help2man-rules.make
Imported Upstream version 2.19.45
[lilypond.git] / stepmake / stepmake / help2man-rules.make
index 51073c20b1e183aad51a215d54a13c73fa053159..9e2f042128d0fd8a6d00ae6a6698d7f7b14fb2af 100644 (file)
@@ -1,5 +1,5 @@
 # We must invoke the generated $(outdir)/help2man script instead of
-# the help2man.pl source, which means that the buildscripts directory
+# the help2man.pl source, which means that the scripts/build directory
 # must be built first.
 #
 # From the perlrun man-page:
 # cases.  Four more explaining what a line comment is, and that it may
 # be parsed, same here.
 
-HELP2MAN_COMMAND = $(PERL) $(top-build-dir)/buildscripts/$(outbase)/help2man $< > $@
+ifeq ($(PYTHON),$(TARGET_PYTHON))
+HELP2MAN_COMMAND = $(buildscript-dir)/help2man $< > $@
+else
+HELP2MAN_COMMAND = $(buildscript-dir)/help2man "env $$(basename $$(head -1 $<)) $<" > $@
+endif
 
 ifeq ($(strip $(CROSS)),no)
-$(outdir)/%.1: $(outdir)/%
+$(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man
+       echo $(buildscript-dir)/help2man
        $(HELP2MAN_COMMAND)
 else
 # When cross building, some manpages will not build because the
@@ -33,3 +38,6 @@ ifneq ($(outdir),./out)
 $(outdir)/%.1: out/%.1
        cp $< $@
 endif
+
+$(buildscript-dir)/help2man:
+       $(MAKE) -C $(depth)/scripts/build