1
1
# Makefile for GNU patch.
2
# Copyright 1993, 1997-1998, 1999 Free Software Foundation, Inc.
3
# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
4
6
# This program is free software; you can redistribute it and/or modify
5
7
# it under the terms of the GNU General Public License as published by
62
LIBSRCS = getopt.c getopt1.c malloc.c memchr.c realloc.c rename.c
63
SRCS = addext.c argmatch.c backupfile.c basename.c error.c inp.c maketime.c \
64
mkdir.c partime.c patch.c pch.c quotearg.c quotesys.c \
65
rmdir.c util.c version.c xmalloc.c $(LIBSRCS)
66
OBJS = addext$U.o argmatch$U.o backupfile$U.o basename$U.o error$U.o inp$U.o \
67
maketime.o partime.o patch$U.o pch$U.o quotearg$U.o quotesys.o \
68
util$U.o version$U.o xmalloc$U.o $(LIBOBJS)
69
HDRS = argmatch.h backupfile.h basename.h common.h error.h getopt.h \
70
inp.h maketime.h partime.h patchlevel.h pch.h quotearg.h quotesys.h \
71
util.h version.h xalloc.h
64
LIBSRCS = error.c malloc.c memchr.c mkdir.c \
65
realloc.c rmdir.c strcasecmp.c strncasecmp.c
67
addext.c argmatch.c backupfile.c \
68
basename.c dirname.c \
69
getopt.c getopt1.c inp.c \
70
maketime.c partime.c \
72
quote.c quotearg.c quotesys.c \
73
util.c version.c xmalloc.c
75
addext.$(OBJEXT) argmatch.$(OBJEXT) backupfile.$(OBJEXT) \
76
basename.$(OBJEXT) dirname.$(OBJEXT) \
77
getopt.$(OBJEXT) getopt1.$(OBJEXT) inp.$(OBJEXT) \
78
maketime.$(OBJEXT) partime.$(OBJEXT) \
79
patch.$(OBJEXT) pch.$(OBJEXT) \
80
quote.$(OBJEXT) quotearg.$(OBJEXT) quotesys.$(OBJEXT) \
81
util.$(OBJEXT) version.$(OBJEXT) xmalloc.$(OBJEXT)
82
HDRS = argmatch.h backupfile.h common.h dirname.h \
83
error.h getopt.h gettext.h \
84
inp.h maketime.h partime.h pch.h \
85
quote.h quotearg.h quotesys.h \
86
unlocked-io.h util.h version.h xalloc.h
72
87
MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
73
aclocal.m4 ansi2knr.1 ansi2knr.c \
74
config.guess config.hin config.sub configure configure.in \
75
install-sh mkinstalldirs patch.man
89
config.hin configure configure.ac \
90
install-sh mkinstalldirs patch.man stdbool.h.in
76
91
DISTFILES = $(MISC) $(SRCS) $(HDRS)
77
92
DISTFILES_M4 = $(ACINCLUDE_INPUTS)
78
93
DISTFILES_PC = pc/chdirsaf.c
114
129
$(SHELL) $(CONFIG_STATUS)
115
130
config.status: configure
116
131
$(SHELL) $(CONFIG_STATUS) --recheck
117
configure: configure.in $(srcdir)/aclocal.m4
132
configure: configure.ac $(srcdir)/aclocal.m4
118
133
cd $(srcdir) && autoconf
119
config.hin: configure.in
134
config.hin: configure.ac $(srcdir)/aclocal.m4
120
135
cd $(srcdir) && rm -f config.hin && autoheader
136
stdbool.h: stdbool.h.in
137
sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' \
138
<$(srcdir)/stdbool.h.in >stdbool.h
122
140
M4DIR = $(srcdir)/m4
123
ACINCLUDE_INPUTS = $(M4DIR)/ccstdc.m4 $(M4DIR)/d-ino.m4 \
124
$(M4DIR)/inttypes_h.m4 $(M4DIR)/largefile.m4 $(M4DIR)/malloc.m4 \
125
$(M4DIR)/protos.m4 $(M4DIR)/realloc.m4 $(M4DIR)/utimbuf.m4
142
$(M4DIR)/backupfile.m4 \
144
$(M4DIR)/dirname.m4 \
149
$(M4DIR)/mbrtowc.m4 \
150
$(M4DIR)/mbstate_t.m4 \
153
$(M4DIR)/onceonly.m4 \
155
$(M4DIR)/quotearg.m4 \
156
$(M4DIR)/realloc.m4 \
158
$(M4DIR)/setmode.m4 \
159
$(M4DIR)/stdbool.m4 \
160
$(M4DIR)/unlocked-io.m4 \
161
$(M4DIR)/utimbuf.m4 \
127
164
$(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
128
165
cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
130
patchlevel.h: configure.in
131
echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
133
TAGS: $(HDRS) patchlevel.h $(SRCS)
134
etags $(HDRS) patchlevel.h $(SRCS)
167
TAGS: $(HDRS) $(SRCS)
168
etags $(HDRS) $(SRCS)
137
rm -f ansi2knr core* *core *.o *_.c
171
rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
139
173
clean:: mostlyclean
140
174
rm -f patch$(EXEEXT)
160
194
tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
165
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) ansi2knr.o $(LIBS)
166
addext_.c argmatch_.c backupfile_.c basename_.c error_.c \
167
getopt_.c getopt1_.c inp_.c malloc_.c mkdir_.c patch_.c pch_.c quotearg_.c \
168
rename_.c util_.c version_.c xmalloc_.c: ansi2knr
173
197
$(OBJS): config.h
174
addext$U.o: backupfile.h
175
argmatch$U.o: argmatch.h error.h quotearg.h
176
backupfile$U.o: argmatch.h backupfile.h
178
getopt$U.o getopt1$U.o: getopt.h
179
inp$U.o: backupfile.h common.h inp.h pch.h quotearg.h util.h xalloc.h
180
maketime.o: maketime.h partime.h
182
patch$U.o: argmatch.h backupfile.h common.h getopt.h inp.h \
198
COMMON = common.h @STDBOOL_H@
199
addext.$(OBJEXT): backupfile.h dirname.h
200
argmatch.$(OBJEXT): argmatch.h gettext.h error.h \
201
quote.h quotearg.h unlocked-io.h
202
backupfile.$(OBJEXT): argmatch.h backupfile.h dirname.h
203
basename.$(OBJEXT): dirname.h
204
dirname.$(OBJEXT): dirname.h xalloc.h
205
error.$(OBJEXT): error.h gettext.h unlocked-io.h
206
getopt.$(OBJEXT) getopt1.$(OBJEXT): getopt.h
207
inp.$(OBJEXT): backupfile.h $(COMMON) inp.h pch.h quotearg.h util.h xalloc.h
208
maketime.$(OBJEXT): maketime.h partime.h
209
mkdir.$(OBJEXT): dirname.h xalloc.h
210
partime.$(OBJEXT): partime.h
211
patch.$(OBJEXT): argmatch.h backupfile.h $(COMMON) getopt.h inp.h \
183
212
pch.h quotearg.h util.h version.h xalloc.h
184
pch$U.o: backupfile.h basename.h common.h inp.h pch.h quotearg.h util.h
185
quotearg$U.o: quotearg.h xalloc.h
186
quotesys.o: quotesys.h
187
util$U.o: backupfile.h basename.h common.h maketime.h \
213
pch.$(OBJEXT): backupfile.h $(COMMON) dirname.h inp.h pch.h quotearg.h util.h
214
quote.$(OBJECT): quote.h quotearg.h
215
quotearg.$(OBJEXT): gettext.h quotearg.h xalloc.h
216
quotesys.$(OBJEXT): quotesys.h
217
strncasecmp.$(OBJEXT): strcasecmp.c
218
util.$(OBJEXT): backupfile.h $(COMMON) dirname.h maketime.h \
188
219
partime.h quotearg.h quotesys.h util.h version.h xalloc.h
189
version$U.o: common.h patchlevel.h util.h version.h
190
xmalloc$U.o: xalloc.h
220
version.$(OBJEXT): $(COMMON) version.h
221
xmalloc.$(OBJEXT): error.h gettext.h xalloc.h