1 # Makefile for Texinfo distribution.
2 # $Id: Makefile.in,v 1.5 1998/03/17 01:38:14 manfred Exp $
4 # Copyright (C) 1993, 96 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #### Start of system configuration section. ####
23 VPATH = $(srcdir):$(common)
25 common = $(srcdir)/libtxi
31 INSTALL_PROGRAM = @INSTALL_PROGRAM@
32 INSTALL_DATA = @INSTALL_DATA@
51 exec_prefix = @exec_prefix@
53 # Prefix for each installed program, normally empty or `g'.
55 # Prefix for each installed man page, normally empty or `g'.
57 mandir = @mandir@/man$(manext)
62 DEFAULT_INFOPATH = $(infodir):.
64 #### End of system configuration section. ####
67 DISTNAME = texinfo-$(VERSION)
69 # Subdirectories that have makefiles
70 SUBDIRS = libtxi makeinfo util emacs
72 # All subdirectories that go into a distribution
73 ALL_SUBDIRS = $(SUBDIRS) makeinfo/macros
75 MDEFINES = bindir='$(bindir)' mandir='$(mandir)' manext='$(manext)' \
76 prefix='$(prefix)' binprefix='$(binprefix)' \
77 manprefix='$(manprefix)' infodir='$(infodir)' CFLAGS='$(CFLAGS)' \
78 CC='$(CC)' ALLOCA='$(ALLOCA)' LDFLAGS='$(LDFLAGS)' \
79 DEFAULT_INFOPATH='$(DEFAULT_INFOPATH)' \
80 INSTALL='$(INSTALL)' INSTALL_DATA='$(INSTALL_DATA)' \
81 INSTALL_PROGRAM='$(INSTALL_PROGRAM)'
87 dvi: texinfo.dvi license.dvi lgpl.dvi
88 @for dir in $(SUBDIRS); do cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@; cd ..; done
90 .PHONY: install installdirs installcheck install-info uninstall
92 install installdirs installcheck install-info uninstall:
94 Makefile: Makefile.in config.status
95 $(SHELL) ./config.status
97 config.status: configure
98 $(SHELL) ./config.status --recheck
100 #configure: configure.in
101 # cd $(srcdir) && autoconf
104 for dir in $(SUBDIRS); do \
105 echo making $@ in $$dir; \
106 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
111 for dir in $(SUBDIRS); do \
112 echo making sub-all in $$dir; \
113 (cd $$dir && $(MAKE) $(MDEFINES) sub-all || exit 1); \
118 for dir in $(SUBDIRS) info; do \
119 echo making $@ in $$dir; \
120 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
124 distclean: clean texclean
125 for dir in $(SUBDIRS) info; do \
126 echo making $@ in $$dir; \
127 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
129 $(RM) Makefile *.status *.cache *.log texinfo texinfo-? texinfo-??
132 $(RM) *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
133 $(RM) *.toc *.tp *.tps *.vr *.vrs
135 realclean maintainer-clean: distclean
137 # Let's hope we weren't cross-compiling.
138 # If we depend on sub-all, this always gets remade. Annoying.
139 info texinfo: texinfo.texi stmp-sub-all
140 ./makeinfo/makeinfo$(EXEEXT) -I$(srcdir) texinfo.texi
144 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/texinfo.texi
147 license.info: $(srcdir)/license.texi
148 $(MAKEINFO) -I$(srcdir) -o license.info $(srcdir)/license.texi
150 license.dvi: $(srcdir)/license.texi
151 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/license.texi
153 lgpl.info: $(srcdir)/liblic.texi
154 $(MAKEINFO) -I$(srcdir) -o lgpl.info $(srcdir)/liblic.texi
156 lgpl.dvi: $(srcdir)/liblic.texi
157 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/liblic.texi
158 mv liblic.dvi lgpl.dvi
163 for d in `find . -type d ! -name RCS -print`; do \
164 d=`echo $$d | grep -v '[@=]'`; \
165 test -z "$$d" || test "$$d" = . || test "$$d" = "./$(DISTNAME)" \
166 || mkdir $(DISTNAME)/$$d; done
167 for f in `cat DISTFILES`; do \
168 $(LN) $(srcdir)/$$f $(DISTNAME)/$$f || \
169 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
171 (cd $(DISTNAME); $(MAKE) $(MFLAGS) distclean)
172 $(TAR) chvf - $(DISTNAME) | gzip >$(DISTNAME).tar.gz
175 # Gets rid of most of the unwanted files. Verify manually (if necessary)
176 # that this produces a list of all the files desired in the distribution.
178 (cd $(srcdir); find . ! -type d -print) \
180 /\/EMACS-BACKUPS\//d; \
189 /\/makeinfo\/makeinfo$$/d; \
190 /\/$(DISTNAME)\/.*$$/d; \
191 /\/util\/texindex$$/d; \
193 /texinfo-[0-9]+$$/d; \
201 /\/conftest\.c$$/d; \
207 /\.aux$$/d; /\.log$$/d; \
208 /\.cps$$/d; /\.cp$$/d; \
209 /\.fns$$/d; /\.fn$$/d; \
210 /\.tps$$/d; /\.tp$$/d; \
211 /\.vrs$$/d; /\.vr$$/d; \
212 /\.pgs$$/d; /\.pg$$/d; \
213 /\.kys$$/d; /\.ky$$/d; \
214 /\.ops$$/d; /\.op$$/d; \
215 s/^.\///; /^\.$$/d;' \
216 | sort | uniq > DISTFILES
220 # Prevent GNU make v3 from overflowing arg limit on SysV.