1 # $Id: makefile.in,v 1.29 2010/07/15 22:45:54 tom Exp $
2 # Makefile-template for 'diffstat'
6 #### Start of system configuration section. ####
13 exec_prefix = @exec_prefix@
21 INSTALL_PROGRAM = @INSTALL_PROGRAM@
22 INSTALL_DATA = @INSTALL_DATA@
28 CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
29 CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
37 BINDIR = $(DESTDIR)$(bindir)
38 MANDIR = $(DESTDIR)$(mandir)
40 #### End of system configuration section. ####
44 man1dir = $(MANDIR)/man1
50 README $(THIS).c $(THIS).1 \
51 config_h.in install-sh \
52 makefile.in configure.in aclocal.m4 \
55 PORTFILES = porting/getopt.c \
60 TESTFILES = testing/README \
64 DISTFILES = configure config.guess config.sub $(SRC)
70 @ECHO_CC@$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
75 @ECHO_LD@$(LINK) $(LDFLAGS) -o $@ diffstat$o $(LIBS)
77 install : all installdirs
78 $(INSTALL_PROGRAM) $(PROG) $(BINDIR)/$(PROG)
79 $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(man1dir)/$(THIS).$(manext)
82 mkdir -p $(BINDIR) $(libdir) $(man1dir)
85 rm -f $(BINDIR)/$(PROG) $(man1dir)/$(THIS).$(manext)
88 rm -f *.o core *~ *.out *.err *.BAK *.atac
94 rm -f makefile config.log config.cache config.status config.h
95 rm -f tags TAGS # don't remove configure!
100 $(SHELL) -c 'PATH=`pwd`:$${PATH}; export PATH; \
101 $(SHELL) $(srcdir)/testing/run_test.sh $(srcdir)/testing/case*.pat'
104 $(LINT) $(CPPFLAGS) $(LINTOPTS) $(THIS).c
107 $(CTAGS) $(THIS).c $(HDRS)
109 @MAKE_UPPER_TAGS@TAGS :
110 @MAKE_UPPER_TAGS@ $(ETAGS) $(THIS).c $(HDRS)
112 dist: makefile $(DISTFILES)
113 # make a list of the files to distribute
115 -e '/"$$[A-Za-z]*: $(THIS)\.c.*$$"/!d' \
116 -e 's/^.*$(THIS)[^ ]*[ ]*//' \
118 -e q $(srcdir)/$(THIS).c` > .fname
120 # contents of top directory
122 for file in $(DISTFILES); do \
123 ln $(srcdir)/$$file `cat .fname` \
124 || { echo copying $$file instead; cp -p $$file `cat .fname`; }; \
126 # contents of top/porting directory
127 mkdir `cat .fname`/porting
128 for file in $(PORTFILES); do \
129 ln $(srcdir)/$$file `cat .fname`/porting \
130 || { echo copying $$file instead; cp -p $$file `cat .fname`/porting; }; \
132 # contents of top/testing directory
133 mkdir `cat .fname`/testing
134 for file in $(TESTFILES); do \
135 ln $(srcdir)/$$file `cat .fname`/testing \
136 || { echo copying $$file instead; cp -p $$file `cat .fname`/testing; }; \
139 tar -cf - `cat .fname` | gzip >`cat .fname`.tgz
140 rm -rf `cat .fname` .fname