TIVI-153: Adding automake14 as dep for iputils package
[profile/ivi/automake14.git] / Makefile.am
1 ## Process this file with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = 1.4
4 MAINT_CHARSET = latin1
5
6 ## We need `.' in SUBDIRS because we want `check' to build `.' before
7 ## tests.
8 SUBDIRS = . m4 tests
9
10 bin_SCRIPTS = automake aclocal
11 info_TEXINFOS = automake.texi
12
13 amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \
14 data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \
15 footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \
16 library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \
17 ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am multilib.am \
18 program.am progs-clean.am progs.am remake-hdr.am remake.am scripts.am \
19 subdirs.am tags-clean.am tags.am texi-vers.am texinfos.am
20
21 pkgvdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 $(amfiles)
22
23 ## These must all be executable when installed.  However, if we use
24 ## _SCRIPTS, then the program transform will be applied, which is not
25 ## what we want.  So we make them executable by hand.
26 scriptdir = $(pkgvdatadir)
27 script_DATA = config.guess config.sub install-sh mdate-sh missing \
28 mkinstalldirs elisp-comp ylwrap acinstall
29
30 install-data-hook:
31         @for prog in $(script_DATA); do \
32           chmod +x $(DESTDIR)$(scriptdir)/$$prog; \
33         done
34
35 ## Make versioned links.  We only run the transform on the root name;
36 ## then we make a versioned link with the transformed base name.  This
37 ## seemed like the most reasonable approach.
38 install-exec-hook:
39         @$(POST_INSTALL)
40         @for p in $(bin_SCRIPTS); do \
41           f="`echo $$p|sed '$(transform)'`"; \
42           fv="$$f-$(APIVERSION)"; \
43           rm -f $(DESTDIR)$(bindir)/$$fv; \
44           echo " $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv"; \
45           $(LN) $(DESTDIR)$(bindir)/$$f $(DESTDIR)$(bindir)/$$fv; \
46         done
47
48 uninstall-hook:
49         @for p in $(bin_SCRIPTS); do \
50           f="`echo $$p|sed '$(transform)'`"; \
51           fv="$$f-$(APIVERSION)"; \
52           rm -f $(DESTDIR)$(bindir)/$$fv; \
53         done
54
55 EXTRA_DIST = acinstall $(pkgvdata_DATA) $(script_DATA)
56
57 # The following requires a fixed version of the Emacs 19.30 etags.
58 ETAGS_ARGS = automake.in aclocal.in --lang=none \
59  --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
60 TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi
61
62 ## `test -x' is not portable.  So we use Perl instead.  If Perl
63 ## doesn't exist, then this test is meaningless anyway.
64 installcheck-local:
65         for file in $(script_DATA); do \
66           $(PERL) -e "exit ! -x '$(pkgvdatadir)/$$file';" || exit 1; \
67         done
68
69 ################################################################
70 ##
71 ## Everything past here is useful to the maintainer, but probably not
72 ## to anybody else
73 ##
74
75 # Run the test suite using Perl 4.
76 perl4-check: automake aclocal
77         @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
78           $(MAKE) PERL=perl4.036 check; \
79         else :; fi
80
81 # Some simple checks, and then ordinary check.  These are only really
82 # guaranteed to work on my machine.
83 maintainer-check: automake aclocal
84 ## This check avoids accidental configure substitutions in the source.
85 ## There are exactly 8 lines that should be modified.  This works out
86 ## to 24 lines of diffs.
87         @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 24; then \
88           echo "found too many diffs between automake.in and automake"; 1>&2; \
89           diff -c $(srcdir)/automake.in automake; \
90           exit 1; \
91         fi
92 ## Syntax check with default Perl (on my machine, Perl 5).
93         $(PERL) -c -w automake
94         $(PERL) -c -w aclocal
95 ## expect no instances of '${...}'.  However, $${...} is ok, since that
96 ## is a shell construct, not a Makefile construct.
97 ## The backslash in `$${' is needed for some versions of bash.
98         @if test `fgrep '\$${' $(srcdir)/[:lower:]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \
99           echo "found too many uses of '\$${'" 1>&2; \
100           exit 1;                               \
101         else :; fi
102 ## Make sure all invocations of mkinstalldirs are correct.
103         @if test `fgrep 'mkinstalldirs' $(srcdir)/[:lower:]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \
104           echo "found incorrect use of mkinstalldirs" 1>&2; \
105           exit 1; \
106         else :; fi
107 ## Another syntax check, this time with Perl 4, if it exists.
108         @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
109           perl4.036 -c -w automake; \
110           perl4.036 -c -w aclocal; \
111         else :; fi
112 ## We never want to use "undef", only "delete".
113         @if grep undef $(srcdir)/automake.in > /dev/null 2>&1; then \
114           echo "Found undef in automake.in; use delete instead" 1>&2; \
115           exit 1; \
116         fi
117 ## We never want split (/ /,...), only split (' ', ...).
118         @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
119           echo "Found bad split in automake.in" 1>&2; \
120           exit 1; \
121         fi
122
123 # Tag before making distribution.  Also, don't make a distribution if
124 # checks fail.  Also, make sure the NEWS file is up-to-date.
125 cvs-dist: maintainer-check perl4-check distcheck
126         @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; else \
127           echo "NEWS not updated; not releasing" 1>&2; \
128           exit 1;                               \
129         fi
130         cd $(srcdir) && cvs -q tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
131         $(MAKE) dist
132
133 cvs-diff:
134         thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
135         if test -z "$$OLDVERSION"; then \
136           prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
137         else prevno="$$OLDVERSION"; fi; \
138         prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
139         cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
140             > $(PACKAGE)-$$prevno-$(VERSION).diff
141
142 ## Check our path lengths.
143 path-check: distdir
144         (cd $(distdir) && \
145 ## FIXME there's got to be a better way!  pathchk should take the list
146 ## of files on stdin, at least.
147           find . -print | xargs pathchk -p); \
148           status=$$?; \
149           rm -rf $(distdir); \
150           exit $$status
151
152 ## Just get the .am files into TAGS.  We don't really care too much if
153 ## any interesting tags show up.
154 ETAGS_ARGS = $(amfiles)
155 TAGS_DEPENDENCIES = $(ETAGS_ARGS)
156
157 ## A temporary hack for the release.
158 DISTCLEANFILES = automake.cm automake.ov