1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
3 ## Free Software Foundation, Inc.
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 ## FIXME: should repeat all the stuff in this file. Instead should
21 ## generate the contents in a smarter way.
24 ## We want to force the .info file to be built in srcdir. This is
25 ## probably the simplest way. However, at Cygnus .info files are
26 ## always put into the build directory. So at runtime we select which
28 ## Note that we also remove the possible output files before running
29 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
30 ## using --no-split), you'll be left with some dead info files lying
31 ## around -- dead files which will end up in the distribution.
32 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
33 NOTCYGNUS cd $(srcdir) \
34 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
35 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
36 CYGNUS $(MAKEINFO) -I $(srcdir) $<
39 TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \
40 ## Must set MAKEINFO like this so that version.texi will be found even
41 ## if it is in srcdir.
42 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
45 ## We want to force the .info file to be built in srcdir. This is
46 ## probably the simplest way. However, at Cygnus .info files are
47 ## always put into the build directory. So at runtime we select which
49 ## Note that we also remove the possible output files before running
50 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
51 ## using --no-split), you'll be left with some dead info files lying
52 ## around -- dead files which will end up in the distribution.
53 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
54 NOTCYGNUS cd $(srcdir) \
55 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
56 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
57 CYGNUS $(MAKEINFO) -I $(srcdir) $<
60 ## We want to force the .info file to be built in srcdir. This is
61 ## probably the simplest way. However, at Cygnus .info files are
62 ## always put into the build directory. So at runtime we select which
64 ## Note that we also remove the possible output files before running
65 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
66 ## using --no-split), you'll be left with some dead info files lying
67 ## around -- dead files which will end up in the distribution.
68 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
69 NOTCYGNUS cd $(srcdir) \
70 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
71 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
72 CYGNUS $(MAKEINFO) -I $(srcdir) $<
75 ## We want to force the .info file to be built in srcdir. This is
76 ## probably the simplest way. However, at Cygnus .info files are
77 ## always put into the build directory. So at runtime we select which
79 ## Note that we also remove the possible output files before running
80 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
81 ## using --no-split), you'll be left with some dead info files lying
82 ## around -- dead files which will end up in the distribution.
83 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
84 NOTCYGNUS cd $(srcdir) \
85 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
86 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
87 CYGNUS $(MAKEINFO) -I $(srcdir) $<
90 TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \
91 ## Must set MAKEINFO like this so that version.texi will be found even
92 ## if it is in srcdir.
93 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
96 ## We want to force the .info file to be built in srcdir. This is
97 ## probably the simplest way. However, at Cygnus .info files are
98 ## always put into the build directory. So at runtime we select which
100 ## Note that we also remove the possible output files before running
101 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
102 ## using --no-split), you'll be left with some dead info files lying
103 ## around -- dead files which will end up in the distribution.
104 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
105 NOTCYGNUS cd $(srcdir) \
106 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
107 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
108 CYGNUS $(MAKEINFO) -I $(srcdir) $<
111 TEXINPUTS=@TEXINFODIR@:$$TEXINPUTS \
112 ## Must set MAKEINFO like this so that version.texi will be found even
113 ## if it is in srcdir.
114 MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
117 ## We want to force the .info file to be built in srcdir. This is
118 ## probably the simplest way. However, at Cygnus .info files are
119 ## always put into the build directory. So at runtime we select which
121 ## Note that we also remove the possible output files before running
122 ## makeinfo. Otherwise, if the texinfo file shrinks (or if you start
123 ## using --no-split), you'll be left with some dead info files lying
124 ## around -- dead files which will end up in the distribution.
125 NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
126 NOTCYGNUS cd $(srcdir) \
127 NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
128 CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
129 CYGNUS $(MAKEINFO) -I $(srcdir) $<
131 ## The way to make PostScript, for those who want it.
136 ## Look in both . and srcdir because the info pages might have been
137 ## rebuilt in the build directory. Can't cd to srcdir; that might
138 ## break a possible install-sh reference.
139 ## Funny name due to --cygnus influence; we want to reserve
140 ## `install-info' for the user.
141 install-info-am: $(INFO_DEPS)
143 $(mkinstalldirs) $(DESTDIR)$(infodir)
144 @list='$(INFO_DEPS)'; \
145 for file in $$list; do \
146 CYGNUS if test -f $$file; then d=.; else d=$(srcdir); fi; \
147 NOTCYGNUS d=$(srcdir); \
148 ## We use these strange circumlocutions because we want the "ifile" to
149 ## be relative, for the install.
150 for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
151 if test -f $$d/$$ifile; then \
152 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
153 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
158 ## Only run this code if install-info actually exists, and it is not
159 ## the Debian install-info. FIXME: once Debian install-info goes
160 ## away, we can remove this hack.
161 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
162 list='$(INFO_DEPS)'; \
163 for file in $$list; do \
164 ## Run `:' after install-info in case install-info fails. We really
165 ## don't care about failures here, because they can be spurious. For
166 ## instance if you don't have a dir file, install-info will fail. I
167 ## think instead it should create a new dir file for you. This bug
168 ## causes the `make distcheck' target to fail reliably.
169 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
170 ## Use `|| :' here because Sun make passes -e to sh; if install-info
171 ## fails then we'd fail if we used `;'.
172 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
178 ## Run two loops here so that we can handle PRE_UNINSTALL and
179 ## NORMAL_UNINSTALL correctly.
180 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
181 list='$(INFO_DEPS)'; \
182 for file in $$list; do \
183 ## install-info needs the actual info file. We use the installed one,
184 ## rather than relying on one still being in srcdir or builddir.
185 echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
186 install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
190 @list='$(INFO_DEPS)'; \
191 for file in $$list; do \
192 (if cd $(DESTDIR)$(infodir); then \
193 echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
194 rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
198 dist-info: $(INFO_DEPS)
199 list='$(INFO_DEPS)'; \
200 for base in $$list; do \
201 ## In Cygnus mode, allow info file to be in source or build dir. In
202 ## other modes, allow only source dir.
203 NOTCYGNUS d=$(srcdir); \
204 CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \
205 for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
206 test -f $(distdir)/$$file \
207 || cp -p $$d/$$file $(distdir)/$$file; \
211 .PHONY: install-info-am uninstall-info