source: vendor/patch/current/Makefile.in

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

patch 2.5.9

File size: 6.3 KB
Line 
1# Makefile for GNU patch.
2
3# Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003 Free Software
4# Foundation, Inc.
5
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)
9# any later version.
10
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.
15
16# You should have received a copy of the GNU General Public License
17# along with this program; see the file COPYING.
18# If not, write to the Free Software Foundation,
19# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21#### Start of system configuration section. ####
22
23srcdir = @srcdir@
24VPATH = @srcdir@
25
26@SET_MAKE@
27
28CC = @CC@
29ed_PROGRAM = @ed_PROGRAM@
30INSTALL = @INSTALL@
31INSTALL_PROGRAM = @INSTALL_PROGRAM@
32INSTALL_DATA = @INSTALL_DATA@
33transform = @program_transform_name@
34
35CFLAGS = @CFLAGS@
36CPPFLAGS = @CPPFLAGS@
37DEFS = @DEFS@
38EXEEXT = @EXEEXT@
39LDFLAGS = @LDFLAGS@
40LIBOBJS = @LIBOBJS@
41LIBS = @LIBS@
42OBJEXT = @OBJEXT@
43PACKAGE_NAME = @PACKAGE_NAME@
44PACKAGE_VERSION = @PACKAGE_VERSION@
45
46prefix = @prefix@
47exec_prefix = @exec_prefix@
48
49bindir = $(exec_prefix)/bin
50
51# Where to put the manual pages.
52mandir = @mandir@
53man1dir = $(mandir)/man1
54# Extension (including `.') for the manual page filenames.
55man1ext = .1
56
57# Hook for nonstandard builds.
58CONFIG_STATUS = config.status
59
60#### End of system configuration section. ####
61
62SHELL = /bin/sh
63
64LIBSRCS = error.c malloc.c memchr.c mkdir.c \
65 realloc.c rmdir.c strcasecmp.c strncasecmp.c
66SRCS = $(LIBSRCS) \
67 addext.c argmatch.c backupfile.c \
68 basename.c dirname.c \
69 getopt.c getopt1.c inp.c \
70 maketime.c partime.c \
71 patch.c pch.c \
72 quote.c quotearg.c quotesys.c \
73 util.c version.c xmalloc.c
74OBJS = $(LIBOBJS) \
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)
82HDRS = 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
87MISC = AUTHORS COPYING ChangeLog INSTALL Makefile.in NEWS README \
88 aclocal.m4 \
89 config.hin configure configure.ac \
90 install-sh mkinstalldirs patch.man stdbool.h.in
91DISTFILES = $(MISC) $(SRCS) $(HDRS)
92DISTFILES_M4 = $(ACINCLUDE_INPUTS)
93DISTFILES_PC = pc/chdirsaf.c
94DISTFILES_PC_DJGPP = pc/djgpp/README pc/djgpp/config.sed \
95 pc/djgpp/configure.bat pc/djgpp/configure.sed
96
97patch_name = `echo patch | sed '$(transform)'`
98
99all:: patch$(EXEEXT)
100
101info::
102check::
103installcheck::
104
105COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -Ded_PROGRAM=\"$(ed_PROGRAM)\" \
106 -I. -I$(srcdir) $(CFLAGS)
107
108.c.$(OBJEXT):
109 $(COMPILE) $<
110
111patch$(EXEEXT): $(OBJS)
112 $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
113
114install:: all installdirs
115 $(INSTALL_PROGRAM) patch$(EXEEXT) $(bindir)/$(patch_name)$(EXEEXT)
116 -$(INSTALL_DATA) $(srcdir)/patch.man $(man1dir)/$(patch_name)$(man1ext)
117
118installdirs::
119 $(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
120
121install-strip::
122 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
123
124uninstall::
125 rm -f $(bindir)/$(patch_name)$(EXEEXT)
126 rm -f $(man1dir)/$(patch_name)$(man1ext)
127
128Makefile: Makefile.in $(CONFIG_STATUS)
129 $(SHELL) $(CONFIG_STATUS)
130config.status: configure
131 $(SHELL) $(CONFIG_STATUS) --recheck
132configure: configure.ac $(srcdir)/aclocal.m4
133 cd $(srcdir) && autoconf
134config.hin: configure.ac $(srcdir)/aclocal.m4
135 cd $(srcdir) && rm -f config.hin && autoheader
136stdbool.h: stdbool.h.in
137 sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' \
138 <$(srcdir)/stdbool.h.in >stdbool.h
139
140M4DIR = $(srcdir)/m4
141ACINCLUDE_INPUTS = \
142 $(M4DIR)/backupfile.m4 \
143 $(M4DIR)/d-ino.m4 \
144 $(M4DIR)/dirname.m4 \
145 $(M4DIR)/dos.m4 \
146 $(M4DIR)/error.m4 \
147 $(M4DIR)/getopt.m4 \
148 $(M4DIR)/malloc.m4 \
149 $(M4DIR)/mbrtowc.m4 \
150 $(M4DIR)/mbstate_t.m4 \
151 $(M4DIR)/memchr.m4 \
152 $(M4DIR)/mkdir.m4 \
153 $(M4DIR)/onceonly.m4 \
154 $(M4DIR)/quote.m4 \
155 $(M4DIR)/quotearg.m4 \
156 $(M4DIR)/realloc.m4 \
157 $(M4DIR)/rmdir.m4 \
158 $(M4DIR)/setmode.m4 \
159 $(M4DIR)/stdbool.m4 \
160 $(M4DIR)/unlocked-io.m4 \
161 $(M4DIR)/utimbuf.m4 \
162 $(M4DIR)/xalloc.m4
163
164$(srcdir)/aclocal.m4: $(ACINCLUDE_INPUTS)
165 cat $(ACINCLUDE_INPUTS) >$(srcdir)/aclocal.m4
166
167TAGS: $(HDRS) $(SRCS)
168 etags $(HDRS) $(SRCS)
169
170mostlyclean::
171 rm -f core* *core *.$(OBJEXT) *_.c stdbool.h
172
173clean:: mostlyclean
174 rm -f patch$(EXEEXT)
175
176distclean:: clean
177 rm -f Makefile config.cache config.log config.status config.h
178
179maintainer-clean::
180 @echo "This command is intended for maintainers to use;"
181 @echo "rebuilding the deleted files requires special tools."
182 $(MAKE) distclean
183 rm -f TAGS
184
185PV = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
186
187dist:: $(DISTFILES) $(DISTFILES_M4) $(DISTFILES_PC) $(DISTFILES_PC_DJGPP)
188 rm -rf $(PV)
189 mkdir $(PV) $(PV)/m4 $(PV)/pc $(PV)/pc/djgpp
190 cp -p $(DISTFILES) $(PV)
191 cp -p $(DISTFILES_M4) $(PV)/m4
192 cp -p $(DISTFILES_PC) $(PV)/pc
193 cp -p $(DISTFILES_PC_DJGPP) $(PV)/pc/djgpp
194 tar -chf - $(PV) | gzip -9 >$(PV).tar.gz
195 rm -rf $(PV)
196
197$(OBJS): config.h
198COMMON = common.h @STDBOOL_H@
199addext.$(OBJEXT): backupfile.h dirname.h
200argmatch.$(OBJEXT): argmatch.h gettext.h error.h \
201 quote.h quotearg.h unlocked-io.h
202backupfile.$(OBJEXT): argmatch.h backupfile.h dirname.h
203basename.$(OBJEXT): dirname.h
204dirname.$(OBJEXT): dirname.h xalloc.h
205error.$(OBJEXT): error.h gettext.h unlocked-io.h
206getopt.$(OBJEXT) getopt1.$(OBJEXT): getopt.h
207inp.$(OBJEXT): backupfile.h $(COMMON) inp.h pch.h quotearg.h util.h xalloc.h
208maketime.$(OBJEXT): maketime.h partime.h
209mkdir.$(OBJEXT): dirname.h xalloc.h
210partime.$(OBJEXT): partime.h
211patch.$(OBJEXT): argmatch.h backupfile.h $(COMMON) getopt.h inp.h \
212 pch.h quotearg.h util.h version.h xalloc.h
213pch.$(OBJEXT): backupfile.h $(COMMON) dirname.h inp.h pch.h quotearg.h util.h
214quote.$(OBJECT): quote.h quotearg.h
215quotearg.$(OBJEXT): gettext.h quotearg.h xalloc.h
216quotesys.$(OBJEXT): quotesys.h
217strncasecmp.$(OBJEXT): strcasecmp.c
218util.$(OBJEXT): backupfile.h $(COMMON) dirname.h maketime.h \
219 partime.h quotearg.h quotesys.h util.h version.h xalloc.h
220version.$(OBJEXT): $(COMMON) version.h
221xmalloc.$(OBJEXT): error.h gettext.h xalloc.h
Note: See TracBrowser for help on using the repository browser.