1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997 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 ## Note that we also remove the possible output files before running
24 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
25 ## using --no-split), you'll be left with some dead info files lying
26 ## around -- dead files which will end up in the distribution.
27 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
28 NOTCYGNUS cd $(srcdir) \
29 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
30 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
31 CYGNUS $(MAKEINFO) -I $(srcdir) $<
34 TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \
35 ## Must set MAKEINFO like this so that version.texi will be found even
36 ## if it is in srcdir.
37 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
40 ## We want to force the .info file to be built in srcdir. This is
41 ## probably the simplest way. However, at Cygnus .info files are
42 ## always put into the build directory. So at runtime we select which
44 ## Note that we also remove the possible output files before running
45 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
46 ## using --no-split), you'll be left with some dead info files lying
47 ## around -- dead files which will end up in the distribution.
48 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
49 NOTCYGNUS cd $(srcdir) \
50 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
51 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
52 CYGNUS $(MAKEINFO) -I $(srcdir) $<
55 ## We want to force the .info file to be built in srcdir. This is
56 ## probably the simplest way. However, at Cygnus .info files are
57 ## always put into the build directory. So at runtime we select which
59 ## Note that we also remove the possible output files before running
60 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
61 ## using --no-split), you'll be left with some dead info files lying
62 ## around -- dead files which will end up in the distribution.
63 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
64 NOTCYGNUS cd $(srcdir) \
65 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
66 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
70 ## We want to force the .info file to be built in srcdir. This is
71 ## probably the simplest way. However, at Cygnus .info files are
72 ## always put into the build directory. So at runtime we select which
74 ## Note that we also remove the possible output files before running
75 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
76 ## using --no-split), you'll be left with some dead info files lying
77 ## around -- dead files which will end up in the distribution.
78 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
79 NOTCYGNUS cd $(srcdir) \
80 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
81 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
85 TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \
86 ## Must set MAKEINFO like this so that version.texi will be found even
87 ## if it is in srcdir.
88 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
90 ## The way to make PostScript, for those who want it.
95 ## Look in both . and srcdir because the info pages might have been
96 ## rebuilt in the build directory. Can't cd to srcdir; that might
97 ## break a possible install-sh reference.
98 ## Funny name due to --cygnus influence; we want to reserve
99 ## `install-info' for the user.
100 install-info-am: $(INFO_DEPS)
102 $(mkinstalldirs) $(infodir)
103 @for file in $(INFO_DEPS); do \
104 CYGNUS if test -f $$file; then d=.; else d=$(srcdir); fi; \
105 NOTCYGNUS d=$(srcdir); \
106 ## We use these strange circumlocutions because we want the "ifile" to
107 ## be relative, for the install.
108 for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
109 if test -f $$d/$$ifile; then \
110 echo " $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile"; \
111 $(INSTALL_DATA) $$d/$$ifile $(infodir)/$$ifile; \
116 ## Only run this code if install-info actually exists, and it is not
117 ## the Debian install-info. FIXME: once Debian install-info goes
118 ## away, we can remove this hack.
119 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
120 for file in $(INFO_DEPS); do \
121 ## Run `:' after install-info in case install-info fails. We really
122 ## don't care about failures here, because they can be spurious. For
123 ## instance if you don't have a dir file, install-info will fail. I
124 ## think instead it should create a new dir file for you. This bug
125 ## causes the `make distcheck' target to fail reliably.
126 echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
127 install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
133 ## Run two loops here so that we can handle PRE_UNINSTALL and
134 ## NORMAL_UNINSTALL correctly.
135 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
138 for file in $(INFO_DEPS); do \
139 test -z $ii || install-info --info-dir=$(infodir) --remove $$file; \
142 for file in $(INFO_DEPS); do \
143 (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
146 dist-info: $(INFO_DEPS)
147 for base in $(INFO_DEPS); do \
148 ## In Cygnus mode, allow info file to be in source or build dir. In
149 ## other modes, allow only source dir.
150 NOTCYGNUS d=$(srcdir); \
151 CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \
152 for file in `cd $$d && eval echo $$base*`; do \
153 test -f $(distdir)/$$file \
154 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
155 || cp -p $$d/$$file $(distdir)/$$file; \