patch/Makefile.in
2009-03-12 15:13:11 +01:00

142 lines
3.8 KiB
Makefile

# Makefile for GNU patch.
# Copyright 1993, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
@SET_MAKE@
CC = @CC@
ED_PROGRAM = @ED_PROGRAM@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
# Where to put the manual pages.
man1dir = $(prefix)/man/man1
# Extension (not including `.') for the manual page filenames.
man1ext = .1
#### End of system configuration section. ####
SHELL = /bin/sh
LIBSRCS = getopt.c getopt1.c memchr.c rename.c
SRCS = addext.c argmatch.c backupfile.c basename.c inp.c \
patch.c pch.c util.c version.c $(LIBSRCS)
OBJS = addext.o argmatch.o backupfile.o basename.o inp.o \
patch.o pch.o util.o version.o $(LIBOBJS)
HDRS = argmatch.h backupfile.h common.h getopt.h \
inp.h pch.h util.h version.h
MISC = COPYING ChangeLog INSTALL Makefile.in NEWS README \
acconfig.h config.hin configure configure.in \
install-sh mkinstalldirs patch.man
DISTFILES = $(MISC) $(SRCS) $(HDRS)
all:: patch
info::
check::
installcheck::
COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -DED_PROGRAM=\"$(ED_PROGRAM)\" \
-I. -I$(srcdir) $(CFLAGS)
.c.o:
$(COMPILE) $<
patch: $(OBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS)
install:: all installdirs
$(INSTALL_PROGRAM) patch $(bindir)/`echo patch | sed '$(transform)'`
-$(INSTALL_DATA) $(srcdir)/patch.man \
$(man1dir)/`echo patch | sed '$(transform)'`$(man1ext)
installdirs::
$(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(man1dir)
uninstall::
rm -f $(bindir)/patch $(man1dir)/patch$(man1ext)
Makefile: Makefile.in config.status
$(SHELL) config.status
config.status: configure
$(SHELL) config.status --recheck
configure: configure.in
cd $(srcdir) && autoconf
config.hin: configure.in acconfig.h
cd $(srcdir) && rm -f config.hin && autoheader
patchlevel.h: Makefile
echo '#define PATCH_VERSION "$(VERSION)"' >patchlevel.h
TAGS: $(HDRS) patchlevel.h $(SRCS)
etags $(HDRS) patchlevel.h $(SRCS)
clean::
rm -f patch *.o core
mostlyclean:: clean
distclean:: clean
rm -f Makefile config.cache config.log config.status config.h
rm -f patchlevel.h
maintainer-clean::
@echo "This command is intended for maintainers to use;"
@echo "rebuilding the deleted files requires special tools."
$(MAKE) distclean
rm -f TAGS
dist:: $(DISTFILES)
rm -rf $(PACKAGE)-$(VERSION)
mkdir $(PACKAGE)-$(VERSION)
ln $(DISTFILES) $(PACKAGE)-$(VERSION)
tar -chf - $(PACKAGE)-$(VERSION) | \
gzip -9 >$(PACKAGE)-$(VERSION).tar.gz
rm -rf $(PACKAGE)-$(VERSION)
$(OBJS): config.h
addext.o: backupfile.h
argmatch.o: argmatch.h
backupfile.o: argmatch.h backupfile.h
basename.o: backupfile.h
getopt.o getopt1.o: getopt.h
inp.o: backupfile.h common.h inp.h util.h pch.h
patch.o: argmatch.h backupfile.h common.h getopt.h inp.h pch.h util.h version.h
pch.o: common.h inp.h pch.h util.h
util.o: backupfile.h common.h util.h version.h
version.o: common.h patchlevel.h util.h version.h