]> git.cameronkatri.com Git - apple_cmds.git/blob - patch_cmds/diffstat/makefile.in
system_cmds: Fix wait4path BINDIR
[apple_cmds.git] / patch_cmds / diffstat / makefile.in
1 # $Id: makefile.in,v 1.29 2010/07/15 22:45:54 tom Exp $
2 # Makefile-template for 'diffstat'
3
4 THIS = diffstat
5
6 #### Start of system configuration section. ####
7
8 srcdir = @srcdir@
9 VPATH = @srcdir@
10
11 DESTDIR = @DESTDIR@
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
14
15 bindir = @bindir@
16 mandir = @mandir@
17
18 CC = @CC@
19 LINK = $(CC)
20 INSTALL = @INSTALL@
21 INSTALL_PROGRAM = @INSTALL_PROGRAM@
22 INSTALL_DATA = @INSTALL_DATA@
23
24 LINT = @LINT@
25 CTAGS = @CTAGS@
26 ETAGS = @ETAGS@
27
28 CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
29 CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@
30
31 LIBS = @LIBS@
32 LDFLAGS = @LDFLAGS@
33
34 o = .@OBJEXT@
35 x = @EXEEXT@
36
37 BINDIR = $(DESTDIR)$(bindir)
38 MANDIR = $(DESTDIR)$(mandir)
39
40 #### End of system configuration section. ####
41
42 SHELL = /bin/sh
43
44 man1dir = $(MANDIR)/man1
45 manext = 1
46
47 PROG = $(THIS)$x
48
49 SRC = CHANGES \
50 README $(THIS).c $(THIS).1 \
51 config_h.in install-sh \
52 makefile.in configure.in aclocal.m4 \
53 makefile.wnt
54
55 PORTFILES = porting/getopt.c \
56 porting/getopt.h \
57 porting/system.h \
58 porting/wildcard.c
59
60 TESTFILES = testing/README \
61 testing/run_test.sh \
62 testing/case0[1-5]*
63
64 DISTFILES = configure config.guess config.sub $(SRC)
65
66 .SUFFIXES: .c $o
67
68 .c$o:
69 @RULE_CC@
70 @ECHO_CC@$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
71
72 all : $(PROG)
73
74 $(PROG) : diffstat$o
75 @ECHO_LD@$(LINK) $(LDFLAGS) -o $@ diffstat$o $(LIBS)
76
77 install : all installdirs
78 $(INSTALL_PROGRAM) $(PROG) $(BINDIR)/$(PROG)
79 $(INSTALL_DATA) $(srcdir)/$(THIS).1 $(man1dir)/$(THIS).$(manext)
80
81 installdirs :
82 mkdir -p $(BINDIR) $(libdir) $(man1dir)
83
84 uninstall :
85 rm -f $(BINDIR)/$(PROG) $(man1dir)/$(THIS).$(manext)
86
87 mostlyclean :
88 rm -f *.o core *~ *.out *.err *.BAK *.atac
89
90 clean : mostlyclean
91 rm -f $(PROG)
92
93 distclean : clean
94 rm -f makefile config.log config.cache config.status config.h
95 rm -f tags TAGS # don't remove configure!
96
97 realclean : distclean
98
99 check : $(PROG)
100 $(SHELL) -c 'PATH=`pwd`:$${PATH}; export PATH; \
101 $(SHELL) $(srcdir)/testing/run_test.sh $(srcdir)/testing/case*.pat'
102
103 lint :
104 $(LINT) $(CPPFLAGS) $(LINTOPTS) $(THIS).c
105
106 tags :
107 $(CTAGS) $(THIS).c $(HDRS)
108
109 @MAKE_UPPER_TAGS@TAGS :
110 @MAKE_UPPER_TAGS@ $(ETAGS) $(THIS).c $(HDRS)
111
112 dist: makefile $(DISTFILES)
113 # make a list of the files to distribute
114 echo $(THIS)-`sed \
115 -e '/"$$[A-Za-z]*: $(THIS)\.c.*$$"/!d' \
116 -e 's/^.*$(THIS)[^ ]*[ ]*//' \
117 -e 's/[ ].*$$//' \
118 -e q $(srcdir)/$(THIS).c` > .fname
119 rm -rf `cat .fname`
120 # contents of top directory
121 mkdir `cat .fname`
122 for file in $(DISTFILES); do \
123 ln $(srcdir)/$$file `cat .fname` \
124 || { echo copying $$file instead; cp -p $$file `cat .fname`; }; \
125 done
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; }; \
131 done
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; }; \
137 done
138 # tar and cleanup
139 tar -cf - `cat .fname` | gzip >`cat .fname`.tgz
140 rm -rf `cat .fname` .fname
141
142 $(THIS).o : config.h
143
144 $(SRC) :