1 # We must invoke the generated $(outdir)/help2man script instead of
2 # the help2man.pl source, which means that the scripts/build directory
5 # From the perlrun man-page:
7 # If the #! line does not contain the word "perl", the
8 # program named after the #! is executed instead of the Perl
9 # interpreter. This is slightly bizarre, but it helps
11 # Indeed it is. Perl sucks.
13 # Two screenfulls explaining that the otherwise standard #! is broken
14 # for perl, and arguing that this broken magic is better in some
15 # cases. Four more explaining what a line comment is, and that it may
16 # be parsed, same here.
18 ifeq ($(PYTHON),$(TARGET_PYTHON))
19 HELP2MAN_COMMAND = $(buildscript-dir)/help2man $< > $@
21 HELP2MAN_COMMAND = $(buildscript-dir)/help2man "env $$(basename $$(head -1 $<)) $<" > $@
24 ifeq ($(strip $(CROSS)),no)
25 $(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man
28 # When cross building, some manpages will not build because the
29 # executable does not run. We assume the manpages to be generated
30 # during a previous compile for the build host, with config=for-build,
31 # in the directory $(outdir)-for-build.
32 $(outdir)/%.1: $(outdir:%=%-for-build)/%.1
36 ifneq ($(outdir),./out)
37 $(outdir)/%.1: out/%.1
41 $(buildscript-dir)/help2man:
42 $(MAKE) -C $(depth)/scripts/build