Debian Codegraph @

man/Makefile.am

raw
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2 dist_man1_MANS = mkid.1 lid.1 fid.1 fnid.1 xtokid.1 eid.1 aid.1 gid.1 defid.1
3
4 man_aux = $(dist_man1_MANS:.1=.x)
5 EXTRA_DIST = $(man_aux)
6 MAINTAINERCLEANFILES = $(dist_man1_MANS)
7
8 # Depend on .version to get version number changes.
9 common_dep = ../.version
10
11 mkid.1: $(common_dep) $(srcdir)/mkid.x ../src/mkid.c
12 lid.1: $(common_dep) $(srcdir)/lid.x ../src/lid.c
13 fid.1: $(common_dep) $(srcdir)/fid.x ../src/fid.c
14 fnid.1: $(common_dep) $(srcdir)/fnid.x ../src/fnid.c
15 xtokid.1: $(common_dep) $(srcdir)/xtokid.x ../src/xtokid.c
16 aid.1: $(common_dep) $(srcdir)/aid.x ../src/lid.c
17 eid.1: $(common_dep) $(srcdir)/eid.x ../src/lid.c
18 gid.1: $(common_dep) $(srcdir)/gid.x ../src/lid.c
19 defid.1: $(common_dep) $(srcdir)/defid.x ../src/lid.c
20
21 SUFFIXES = .x .1
22 .x.1:
23 $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
24 $(HELP2MAN) \
25 --include=$(srcdir)/$*.x \
26 --output=$@ $*$(EXEEXT)
27
28 check-local: check-x-vs-1 check-programs-vs-x
29
30 # Sort in traditional ASCII order, regardless of the current locale;
31 # otherwise we may get into trouble with distinct strings that the
32 # current locale considers to be equal.
33 ASSORT = LC_ALL=C sort
34
35 # Ensure that for each .x file in this directory, there is a
36 # corresponding .1 file in the definition of $(dist_man1_MANS) above.
37 .PHONY: check-x-vs-1
38 check-x-vs-1:
39 $(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
40 t=ls-files.$$$$; \
41 (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
42 echo $(dist_man1_MANS) | tr -s ' ' '\012' | sed 's/\.1$$//' \
43 | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
44 rm $$t
45
46 programs = \
47 echo 'spy:;@echo $$(PROGRAMS) $$(SCRIPTS)' \
48 | MAKEFLAGS= $(MAKE) -s -C $(srcdir)/../src -f Makefile -f - spy \
49 | tr -s ' ' '\012' | $(ASSORT) -u
50
51 .PHONY: check-programs-vs-x
52 check-programs-vs-x:
53 $(AM_V_GEN)for p in `$(programs)`; do \
54 test -f $(srcdir)/$$p.x \
55 || { echo missing $$p.x 1>&2; missing=1; }; \
56 done; \
57 test "$$missing" = 1 && exit 1 || :