source: vendor/automake/1.4-p6/texinfos.am@ 3124

Last change on this file since 3124 was 3124, checked in by bird, 18 years ago

automake 1.4-p6

File size: 8.6 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1994, 1995, 1996, 1997, 1998, 2001
3## Free Software Foundation, Inc.
4
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)
8## any later version.
9
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.
14
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
18## 02111-1307, USA.
19
20## FIXME: should repeat all the stuff in this file. Instead should
21## generate the contents in a smarter way.
22
23.texi.info:
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
27## rule to use.
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.
32NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
33NOTCYGNUS cd $(srcdir) \
34NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
35CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
36CYGNUS $(MAKEINFO) -I $(srcdir) $<
37
38.texi.dvi:
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) $<
43
44.texi:
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
48## rule to use.
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.
53NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
54NOTCYGNUS cd $(srcdir) \
55NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
56CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
57CYGNUS $(MAKEINFO) -I $(srcdir) $<
58
59.texinfo.info:
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
63## rule to use.
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.
68NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
69NOTCYGNUS cd $(srcdir) \
70NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
71CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
72CYGNUS $(MAKEINFO) -I $(srcdir) $<
73
74.texinfo:
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
78## rule to use.
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.
83NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
84NOTCYGNUS cd $(srcdir) \
85NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
86CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
87CYGNUS $(MAKEINFO) -I $(srcdir) $<
88
89.texinfo.dvi:
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) $<
94
95.txi.info:
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
99## rule to use.
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.
104NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
105NOTCYGNUS cd $(srcdir) \
106NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
107CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
108CYGNUS $(MAKEINFO) -I $(srcdir) $<
109
110.txi.dvi:
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) $<
115
116.txi:
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
120## rule to use.
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.
125NOTCYGNUS @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
126NOTCYGNUS cd $(srcdir) \
127NOTCYGNUS && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
128CYGNUS @rm -f $@ $@-[0-9] $@-[0-9][0-9]
129CYGNUS $(MAKEINFO) -I $(srcdir) $<
130
131## The way to make PostScript, for those who want it.
132DVIPS = dvips
133.dvi.ps:
134 $(DVIPS) $< -o $@
135
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.
141install-info-am: $(INFO_DEPS)
142 @$(NORMAL_INSTALL)
143 $(mkinstalldirs) $(DESTDIR)$(infodir)
144 @list='$(INFO_DEPS)'; \
145 for file in $$list; do \
146CYGNUS if test -f $$file; then d=.; else d=$(srcdir); fi; \
147NOTCYGNUS d=$(srcdir); \
148## We use these strange circumlocutions because we want the "ifile" to
149## be relative, for the install.
150 for ifile in `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; \
154 else : ; fi; \
155 done; \
156 done
157 @$(POST_INSTALL)
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 || :;\
173 done; \
174 else : ; fi
175
176uninstall-info:
177 $(PRE_UNINSTALL)
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 ii=yes; \
182 else ii=; fi; \
183 list='$(INFO_DEPS)'; \
184 for file in $$list; do \
185 test -z "$$ii" \
186 || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
187 done
188 @$(NORMAL_UNINSTALL)
189 list='$(INFO_DEPS)'; \
190 for file in $$list; do \
191 (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
192 done
193
194dist-info: $(INFO_DEPS)
195 list='$(INFO_DEPS)'; \
196 for base in $$list; do \
197## In Cygnus mode, allow info file to be in source or build dir. In
198## other modes, allow only source dir.
199NOTCYGNUS d=$(srcdir); \
200CYGNUS if test -f $$base; then d=.; else d=$(srcdir); fi; \
201 for file in `cd $$d && eval echo $$base*`; do \
202 test -f $(distdir)/$$file \
203 || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
204 || cp -p $$d/$$file $(distdir)/$$file; \
205 done; \
206 done
Note: See TracBrowser for help on using the repository browser.