File: help2man-rules.make

package info (click to toggle)
lilypond 2.19.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 76,396 kB
  • sloc: cpp: 79,385; ansic: 75,071; lisp: 59,263; xml: 31,196; python: 22,406; sh: 8,159; yacc: 3,872; perl: 3,507; asm: 1,587; lex: 1,408; makefile: 1,048; tcl: 457; awk: 199; php: 53; csh: 50
file content (24 lines) | stat: -rw-r--r-- 726 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# The distributed help2man sucks; use the Debian version instead.
ifeq ($(PYTHON),$(TARGET_PYTHON))
HELP2MAN_COMMAND = help2man $< > $@
else
HELP2MAN_COMMAND = help2man "env $$(basename $$(head -1 $<)) $<" > $@
endif

ifeq ($(strip $(CROSS)),no)
$(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man
	echo $(buildscript-dir)/help2man
	$(HELP2MAN_COMMAND)
else
# When cross building, some manpages will not build because the
# executable does not run.  We assume the manpages to be generated
# during a previous compile for the build host, with config=for-build,
# in the directory $(outdir)-for-build.
$(outdir)/%.1: $(outdir:%=%-for-build)/%.1
	cp $< $@
endif

ifneq ($(outdir),./out)
$(outdir)/%.1: out/%.1
	cp $< $@
endif