1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 ## We want to force the .info file to be built in srcdir. This is
20 ## probably the simplest way. However, at Cygnus .info files are
21 ## always put into the build directory. So at runtime we select which
23 NOTCYGNUS cd $(srcdir) \
24 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
25 CYGNUS $(MAKEINFO) -I $(srcdir) $<
28 TEXINPUTS=$(srcdir):$$TEXINPUTS \
29 ## Must set MAKEINFO like this so that version.texi will be found even
30 ## if it is in srcdir.
31 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
34 ## We want to force the .info file to be built in srcdir. This is
35 ## probably the simplest way. However, at Cygnus .info files are
36 ## always put into the build directory. So at runtime we select which
38 NOTCYGNUS cd $(srcdir) \
39 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
43 TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
45 ## The way to make PostScript, for those who want it.
50 ## Look in both . and srcdir because the info pages might have been
51 ## rebuilt in the build directory. Can't cd to srcdir; that might
52 ## break a possible install-sh reference.
53 ## Funny name due to --cygnus influence; we want to reserve
54 ## `install-info' for the user.
55 install-info-am: $(INFO_DEPS)
57 $(mkinstalldirs) $(infodir)
58 @for file in $(INFO_DEPS); do \
59 ## We use these strange circumlocutions because we want the "ifile" to
60 ## be relative, for the install.
61 for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
62 if test -f $(srcdir)/$$ifile; then \
63 echo " $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile"; \
64 $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
69 ## Only run this code if install-info actually exists.
70 @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
71 for file in $(INFO_DEPS); do \
72 ## Run `:' after install-info in case install-info fails. We really
73 ## don't care about failures here, because they can be spurious. For
74 ## instance if you don't have a dir file, install-info will fail. I
75 ## think instead it should create a new dir file for you. This bug
76 ## causes the `make distcheck' target to fail reliably.
77 echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
78 install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
83 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
86 for file in $(INFO_DEPS); do \
87 (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
88 test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
91 dist-info: $(INFO_DEPS)
92 for base in $(INFO_DEPS); do \
93 ## In Cygnus mode, allow info file to be in source or build dir. In
94 ## other modes, allow only source dir.
95 NOTCYGNUS d=$(srcdir); \
96 CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \
97 for file in `cd $$d && eval echo $$base*`; do \
98 test -f $(distdir)/$$file \
99 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
100 || cp -p $$d/$$file $(distdir)/$$file; \