source: trunk/third/diffutils/Makefile.in @ 16149

Revision 16149, 5.3 KB checked in by rbasch, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16148, which included commits to RCS files with non-trunk default branches.
Line 
1# Makefile for GNU DIFF
2# Copyright (C) 1988,1989,1991,1992,1993,1994 Free Software Foundation, Inc.
3#
4# This file is part of GNU DIFF.
5#
6# GNU DIFF 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)
9# any later version.
10#
11# GNU DIFF 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.
15#
16# You should have received a copy of the GNU General Public License
17# along with GNU DIFF; see the file COPYING.  If not, write to
18# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19
20#### Start of system configuration section. ####
21
22srcdir = @srcdir@
23VPATH = @srcdir@
24
25CC = @CC@
26INSTALL = @INSTALL@
27INSTALL_PROGRAM = @INSTALL_PROGRAM@
28INSTALL_DATA = @INSTALL_DATA@
29MAKEINFO = makeinfo
30TEXI2DVI = texi2dvi
31
32CPPFLAGS = @CPPFLAGS@
33DEFS = @DEFS@
34CFLAGS = @CFLAGS@
35LDFLAGS = @LDFLAGS@
36LIBS = @LIBS@
37LIBOBJS = @LIBOBJS@
38
39# Some System V machines do not come with libPW.
40# If this is true for you, use the GNU alloca.o here.
41ALLOCA = @ALLOCA@
42
43prefix = @prefix@
44exec_prefix = @exec_prefix@
45edit_program_name = sed '@program_transform_name@'
46
47bindir = $(exec_prefix)/bin
48
49infodir = $(prefix)/info
50
51DEFAULT_EDITOR_PROGRAM = ed
52DIFF_PROGRAM = $(bindir)/`echo diff | $(edit_program_name)`
53NULL_DEVICE = /dev/null
54PR_PROGRAM = /bin/pr
55
56#### End of system configuration section. ####
57
58SHELL = /bin/sh
59
60# The source files for all of the programs.
61srcs=diff.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c normal.c ifdef.c \
62        util.c dir.c memchr.c waitpid.c \
63        version.c diff.h regex.c regex.h side.c system.h \
64        diff3.c sdiff.c cmp.c error.c xmalloc.c getopt.c getopt1.c getopt.h \
65        fnmatch.c fnmatch.h alloca.c
66distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in \
67        stamp-h.in config.hin configure configure.in COPYING ChangeLog \
68        diff.texi diff.info* texinfo.tex \
69        install-sh mkinstalldirs
70
71PROGRAMS = cmp diff diff3 sdiff
72
73all: $(PROGRAMS) info
74
75COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS)
76
77.c.o:
78        $(COMPILE) $<
79
80diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
81        context.o ed.o ifdef.o normal.o side.o \
82        fnmatch.o getopt.o getopt1.o regex.o version.o $(ALLOCA) $(LIBOBJS)
83diff: $(diff_o)
84        $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff_o) $(LIBS)
85
86diff3_o = diff3.o getopt.o getopt1.o version.o $(LIBOBJS)
87diff3: $(diff3_o)
88        $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff3_o) $(LIBS)
89
90sdiff_o = sdiff.o getopt.o getopt1.o version.o $(LIBOBJS)
91sdiff: $(sdiff_o)
92        $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(sdiff_o) $(LIBS)
93
94cmp_o = cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o $(LIBOBJS)
95cmp: $(cmp_o)
96        $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(cmp_o) $(LIBS)
97
98info: diff.info
99diff.info: diff.texi
100        $(MAKEINFO) $(srcdir)/diff.texi --output=$@
101
102dvi: diff.dvi
103diff.dvi: diff.texi
104        $(TEXI2DVI) $(srcdir)/diff.texi
105
106$(diff_o): diff.h system.h
107cmp.o diff3.o sdiff.o: system.h
108context.o diff.o regex.o: regex.h
109cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
110diff.o fnmatch.o: fnmatch.h
111analyze.o cmpbuf.o cmp.o: cmpbuf.h
112
113cmp.o: cmp.c
114        $(COMPILE) -DNULL_DEVICE=\"$(NULL_DEVICE)\" $(srcdir)/cmp.c
115
116diff3.o: diff3.c
117        $(COMPILE) -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/diff3.c
118
119sdiff.o: sdiff.c
120        $(COMPILE) -DDEFAULT_EDITOR_PROGRAM=\"$(DEFAULT_EDITOR_PROGRAM)\" \
121                -DDIFF_PROGRAM=\"$(DIFF_PROGRAM)\" $(srcdir)/sdiff.c
122
123util.o: util.c
124        $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $(srcdir)/util.c
125
126TAGS: $(srcs)
127        etags $(srcs)
128
129clean:
130        rm -f *.o $(PROGRAMS) core
131        rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
132        rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
133
134mostlyclean: clean
135
136distclean: clean
137        rm -f Makefile config.cache config.h config.log config.status stamp-h
138
139realclean: distclean
140        rm -f TAGS *.info*
141
142install: all installdirs
143        for p in $(PROGRAMS); do \
144          $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | $(edit_program_name)`; \
145        done
146        { test -f diff.info || cd $(srcdir); } && \
147        for f in diff.info*; do \
148          $(INSTALL_DATA) $$f $(infodir)/$$f; \
149        done
150
151installdirs:
152        $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir)
153
154# We need more tests.
155check:
156        ./cmp cmp cmp
157        ./diff diff diff
158        ./diff3 diff3 diff3 diff3
159        ./sdiff sdiff sdiff
160
161uninstall:
162        for p in $(PROGRAMS); do \
163          rm -f $(bindir)/`echo $$p | $(edit_program_name)`; \
164        done
165        rm -f $(infodir)/diff.info*
166
167configure: configure.in
168        cd $(srcdir) && autoconf
169
170# autoheader might not change config.hin.
171config.hin: stamp-h.in
172stamp-h.in: configure.in
173        cd $(srcdir) && autoheader
174        date > $(srcdir)/stamp-h.in
175
176config.status: configure
177        ./config.status --recheck
178
179# config.status might not change config.h, but it changes stamp-h.
180config.h: stamp-h
181stamp-h: config.hin config.status
182        ./config.status
183Makefile: Makefile.in config.status
184        ./config.status
185
186dist: $(distfiles)
187        echo diffutils-`sed -e '/version_string/!d' -e 's/[^0-9]*\([0-9a-z.]*\).*/\1/' -e q version.c` > .fname
188        rm -rf `cat .fname`
189        mkdir `cat .fname`
190        -ln $(distfiles) `cat .fname`
191        for file in $(distfiles); do \
192          [ -r `cat .fname`/$$file ] || cp -p $$file `cat .fname` || exit; \
193        done
194        tar -chf - `cat .fname` | gzip >`cat .fname`.tar.gz
195        rm -rf `cat .fname` .fname
196
197# Prevent GNU make v3 from overflowing arg limit on SysV.
198.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.