mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 01:44:20 +00:00
248 lines
6.8 KiB
Makefile
248 lines
6.8 KiB
Makefile
# Makefile for GNU DIFF
|
|
# Copyright 1988, 89, 91, 92, 93, 94, 95, 1998 Free Software Foundation, Inc.
|
|
#
|
|
# This file is part of GNU DIFF.
|
|
#
|
|
# GNU DIFF 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.
|
|
#
|
|
# GNU DIFF 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. ####
|
|
|
|
PACKAGE = diffutils
|
|
VERSION = 2.7.2
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
|
|
CC = @CC@
|
|
INSTALL = @INSTALL@
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
MAKEINFO = makeinfo
|
|
TEXI2DVI = texi2dvi
|
|
|
|
CFLAGS = @CFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
DEFS = @DEFS@
|
|
LDFLAGS = @LDFLAGS@
|
|
LIBOBJS = @LIBOBJS@
|
|
LIBS = @LIBS@
|
|
|
|
# Some System V machines do not come with libPW.
|
|
# If this is true for you, use the GNU alloca.o here.
|
|
ALLOCA = @ALLOCA@
|
|
|
|
prefix = @prefix@
|
|
exec_prefix = @exec_prefix@
|
|
edit_program_name = sed '@program_transform_name@'
|
|
|
|
bindir = $(exec_prefix)/bin
|
|
|
|
infodir = $(prefix)/info
|
|
|
|
DEFAULT_DIFF_PROGRAM = $(bindir)/`echo diff | $(edit_program_name)`
|
|
DEFAULT_EDITOR_PROGRAM = ed
|
|
NULL_DEVICE = /dev/null
|
|
PR_PROGRAM = @PR_PROGRAM@
|
|
|
|
#### End of system configuration section. ####
|
|
|
|
SHELL = /bin/sh
|
|
|
|
# The source files for all of the programs.
|
|
srcs = \
|
|
analyze.c cmp.c cmpbuf.c cmpbuf.h context.c \
|
|
diff.c diff.h diff3.c dir.c ed.c freesoft.c ifdef.c io.c \
|
|
memchr.c normal.c quotesys.c quotesys.h sdiff.c side.c system.h \
|
|
util.c waitpid.c \
|
|
alloca.c error.c fnmatch.c fnmatch.h \
|
|
getopt.c getopt.h getopt1.c regex.c regex.h xmalloc.c
|
|
distfiles = $(srcs) README INSTALL NEWS diagmeet.note Makefile.in \
|
|
stamp-h.in config.hin configure configure.in acconfig.h \
|
|
COPYING ChangeLog \
|
|
diff.texi diff.info texinfo.tex \
|
|
install-sh mkinstalldirs getmsgids version.c version.texi \
|
|
message/en_UK.po message/msgid.po message/template.po \
|
|
message/de.po message/es.po message/fr.po message/pl.po message/sv.po \
|
|
pc/COPYING pc/INSTALL pc/config.h pc/makefile pc/makefile.sed pc/pc.c \
|
|
pc/djgpp/config.h pc/djgpp/makefile.sed \
|
|
pc/emx/config.h pc/emx/diff.def pc/emx/gnuregex.def pc/emx/makefile.sed
|
|
|
|
PROGRAMS = cmp diff diff3 sdiff
|
|
|
|
all: $(distfiles) $(PROGRAMS)
|
|
|
|
version.c:
|
|
(echo '#include <config.h>' && \
|
|
echo 'char const version_string[] = "(GNU $(PACKAGE)) $(VERSION)";') \
|
|
>$@
|
|
|
|
version.texi: diff.texi
|
|
(echo '@set VERSION $(VERSION)' && \
|
|
set `sed -n '/^.*\$$Id: diff.texi,v \([^ ]*\) \([^ ]*\).*/{ s//\1 \2/; s|/|-|g; p; q; }' diff.texi` && \
|
|
echo "@set EDITION $$1" && \
|
|
echo "@set UPDATED $$2") >$@
|
|
|
|
COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) $(CFLAGS)
|
|
|
|
.c.o:
|
|
$(COMPILE) $<
|
|
|
|
common_o = error.o freesoft.o getopt.o getopt1.o version.o xmalloc.o
|
|
|
|
diff_o = diff.o analyze.o cmpbuf.o dir.o io.o util.o \
|
|
context.o ed.o ifdef.o normal.o side.o \
|
|
fnmatch.o regex.o quotesys.o $(common_o) $(ALLOCA) $(LIBOBJS)
|
|
diff: $(diff_o)
|
|
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff_o) $(LIBS)
|
|
|
|
diff3_o = diff3.o quotesys.o $(common_o) $(LIBOBJS)
|
|
diff3: $(diff3_o)
|
|
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(diff3_o) $(LIBS)
|
|
|
|
sdiff_o = sdiff.o quotesys.o $(common_o) $(LIBOBJS)
|
|
sdiff: $(sdiff_o)
|
|
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(sdiff_o) $(LIBS)
|
|
|
|
cmp_o = cmp.o cmpbuf.o $(common_o) $(LIBOBJS)
|
|
cmp: $(cmp_o)
|
|
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(cmp_o) $(LIBS)
|
|
|
|
info: diff.info
|
|
diff.info: diff.texi version.texi
|
|
$(MAKEINFO) --no-split $(srcdir)/diff.texi --output=$@
|
|
|
|
dvi: diff.dvi
|
|
diff.dvi: diff.texi version.texi
|
|
$(TEXI2DVI) $(srcdir)/diff.texi
|
|
|
|
$(diff_o): diff.h system.h
|
|
cmp.o diff3.o sdiff.o: system.h
|
|
context.o diff.o regex.o: regex.h
|
|
cmp.o diff.o diff3.o sdiff.o getopt.o getopt1.o: getopt.h
|
|
diff.o fnmatch.o: fnmatch.h
|
|
analyze.o cmpbuf.o cmp.o: cmpbuf.h
|
|
diff.o diff3.o quotesys.o sdiff.o util.o: quotesys.h
|
|
|
|
cmp.o: cmp.c
|
|
$(COMPILE) -DNULL_DEVICE=\"$(NULL_DEVICE)\" $(srcdir)/cmp.c
|
|
|
|
diff3.o: diff3.c
|
|
$(COMPILE) \
|
|
-DDEFAULT_DIFF_PROGRAM=\"$(DEFAULT_DIFF_PROGRAM)\" \
|
|
$(srcdir)/diff3.c
|
|
|
|
sdiff.o: sdiff.c
|
|
$(COMPILE) \
|
|
-DDEFAULT_DIFF_PROGRAM=\"$(DEFAULT_DIFF_PROGRAM)\" \
|
|
-DDEFAULT_EDITOR_PROGRAM=\"$(DEFAULT_EDITOR_PROGRAM)\" \
|
|
$(srcdir)/sdiff.c
|
|
|
|
util.o: util.c
|
|
$(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $(srcdir)/util.c
|
|
|
|
TAGS: $(srcs)
|
|
etags $(srcs)
|
|
|
|
message/msgid.po: getmsgids $(srcs)
|
|
./getmsgids $(srcs) >$@
|
|
|
|
message/template.po: message/msgid.po
|
|
sed 'p; s/^msgid "/msgstr "TRANSLATED /; p; s/.*//' <$? >$@
|
|
|
|
clean:
|
|
rm -f *.o $(PROGRAMS) core
|
|
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
|
|
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
|
|
|
|
mostlyclean: clean
|
|
|
|
distclean: clean
|
|
rm -f Makefile config.cache config.h config.log config.status stamp-h
|
|
|
|
maintainer-clean:
|
|
@echo "This command is intended for maintainers to use;"
|
|
@echo "it deletes files that may require special tools to rebuild."
|
|
$(MAKE) distclean
|
|
rm -f TAGS *.info version.*
|
|
cd message && rm -f msgid.po template.po
|
|
|
|
install: all installdirs
|
|
for p in $(PROGRAMS); do \
|
|
$(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | $(edit_program_name)`; \
|
|
done
|
|
if test -f diff.info; then d=.; else :; d=$(srcdir); fi; \
|
|
$(INSTALL_DATA) $$d/diff.info $(infodir)/diff.info; \
|
|
if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; \
|
|
then install-info --dir-file=$(infodir) $$d/diff.info; \
|
|
else :; \
|
|
fi
|
|
|
|
install-strip:
|
|
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
|
|
|
|
installdirs:
|
|
$(SHELL) $(srcdir)/mkinstalldirs $(bindir) $(infodir)
|
|
|
|
# We need more tests.
|
|
check: $(PROGRAMS)
|
|
./cmp cmp cmp
|
|
./diff diff diff
|
|
DIFF=./diff ./diff3 diff3 diff3 diff3
|
|
DIFF=./diff ./sdiff sdiff sdiff
|
|
|
|
uninstall:
|
|
for p in $(PROGRAMS); do \
|
|
rm -f $(bindir)/`echo $$p | $(edit_program_name)`; \
|
|
done
|
|
rm -f $(infodir)/diff.info*
|
|
|
|
configure: configure.in
|
|
cd $(srcdir) && autoconf
|
|
|
|
# autoheader might not change config.hin.
|
|
config.hin: stamp-h.in
|
|
stamp-h.in: configure.in acconfig.h
|
|
cd $(srcdir) && autoheader
|
|
echo timestamp > $(srcdir)/stamp-h.in
|
|
|
|
config.status: configure
|
|
./config.status --recheck
|
|
|
|
# config.status might not change config.h, but it changes stamp-h.
|
|
config.h: stamp-h
|
|
stamp-h: config.hin config.status
|
|
./config.status
|
|
Makefile: Makefile.in config.status
|
|
./config.status
|
|
|
|
D = $(PACKAGE)-$(VERSION)
|
|
D_dirs = $D $D/message $D/pc $D/pc/djgpp $D/pc/emx
|
|
|
|
dist: $D.tar.gz
|
|
|
|
$D.tar.gz: $(distfiles)
|
|
rm -fr $D
|
|
mkdir $(D_dirs)
|
|
chmod a+rwx $(D_dirs)
|
|
for file in $(distfiles); do \
|
|
cp -p $$file $D/$$file; \
|
|
done
|
|
tar -chf - $D | gzip -9 >$@
|
|
rm -fr $D
|
|
|
|
# Prevent GNU make v3 from overflowing arg limit on SysV.
|
|
.NOEXPORT:
|