1 # Makefile for Texinfo distribution.
2 # $Id: Makefile.in,v 1.2 1997/09/03 04:25:21 law 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 info 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 Makefile: Makefile.in config.status
93 $(SHELL) ./config.status
95 config.status: configure
96 $(SHELL) ./config.status --recheck
98 #configure: configure.in
99 # cd $(srcdir) && autoconf
102 for dir in $(SUBDIRS); do \
103 echo making $@ in $$dir; \
104 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
109 for dir in $(SUBDIRS); do \
110 echo making sub-all in $$dir; \
111 (cd $$dir && $(MAKE) $(MDEFINES) sub-all || exit 1); \
116 for dir in $(SUBDIRS); do \
117 echo making $@ in $$dir; \
118 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
122 distclean: clean texclean
123 for dir in $(SUBDIRS); do \
124 echo making $@ in $$dir; \
125 (cd $$dir && $(MAKE) $(MDEFINES) $@ || exit 1); \
127 $(RM) Makefile *.status *.cache *.log texinfo texinfo-? texinfo-??
130 $(RM) *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs
131 $(RM) *.toc *.tp *.tps *.vr *.vrs
133 realclean maintainer-clean: distclean
135 # Let's hope we weren't cross-compiling.
136 # If we depend on sub-all, this always gets remade. Annoying.
137 info texinfo: texinfo.texi stmp-sub-all
138 ./makeinfo/makeinfo$(EXEEXT) -I$(srcdir) texinfo.texi
142 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/texinfo.texi
145 license.info: $(srcdir)/license.texi
146 $(MAKEINFO) -I$(srcdir) -o license.info $(srcdir)/license.texi
148 license.dvi: $(srcdir)/license.texi
149 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/license.texi
151 lgpl.info: $(srcdir)/liblic.texi
152 $(MAKEINFO) -I$(srcdir) -o lgpl.info $(srcdir)/liblic.texi
154 lgpl.dvi: $(srcdir)/liblic.texi
155 PATH="$(srcdir)/util:$${PATH}" TEXINPUTS="$(srcdir):$(common):$${TEXINPUTS}" texi2dvi $(srcdir)/liblic.texi
156 mv liblic.dvi lgpl.dvi
161 for d in `find . -type d ! -name RCS -print`; do \
162 d=`echo $$d | grep -v '[@=]'`; \
163 test -z "$$d" || test "$$d" = . || test "$$d" = "./$(DISTNAME)" \
164 || mkdir $(DISTNAME)/$$d; done
165 for f in `cat DISTFILES`; do \
166 $(LN) $(srcdir)/$$f $(DISTNAME)/$$f || \
167 { echo copying $$f; cp -p $(srcdir)/$$f $(DISTNAME)/$$f ; } \
169 (cd $(DISTNAME); $(MAKE) $(MFLAGS) distclean)
170 $(TAR) chvf - $(DISTNAME) | gzip >$(DISTNAME).tar.gz
173 # Gets rid of most of the unwanted files. Verify manually (if necessary)
174 # that this produces a list of all the files desired in the distribution.
176 (cd $(srcdir); find . ! -type d -print) \
178 /\/EMACS-BACKUPS\//d; \
187 /\/makeinfo\/makeinfo$$/d; \
188 /\/$(DISTNAME)\/.*$$/d; \
189 /\/util\/texindex$$/d; \
191 /texinfo-[0-9]+$$/d; \
199 /\/conftest\.c$$/d; \
205 /\.aux$$/d; /\.log$$/d; \
206 /\.cps$$/d; /\.cp$$/d; \
207 /\.fns$$/d; /\.fn$$/d; \
208 /\.tps$$/d; /\.tp$$/d; \
209 /\.vrs$$/d; /\.vr$$/d; \
210 /\.pgs$$/d; /\.pg$$/d; \
211 /\.kys$$/d; /\.ky$$/d; \
212 /\.ops$$/d; /\.op$$/d; \
213 s/^.\///; /^\.$$/d;' \
214 | sort | uniq > DISTFILES
218 # Prevent GNU make v3 from overflowing arg limit on SysV.