5
|
1 # Makefile for library files used by GNU fileutils. |
68
|
2 # Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. |
5
|
3 |
|
4 # This program is free software; you can redistribute it and/or modify |
|
5 # it under the terms of the GNU General Public License as published by |
|
6 # the Free Software Foundation; either version 2, or (at your option) |
|
7 # any later version. |
|
8 |
|
9 # This program is distributed in the hope that it will be useful, |
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 # GNU General Public License for more details. |
|
13 |
|
14 # You should have received a copy of the GNU General Public License |
|
15 # along with this program; if not, write to the Free Software |
|
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|
17 |
|
18 SHELL = /bin/sh |
|
19 |
|
20 srcdir = @srcdir@ |
|
21 VPATH = @srcdir@ |
|
22 |
68
|
23 CC = @CC@ |
|
24 AR = ar |
|
25 RANLIB = @RANLIB@ |
|
26 DEFS = @DEFS@ |
|
27 CFLAGS = -g |
|
28 |
|
29 SOURCES = getdate.y posixtm.y \ |
|
30 argmatch.c backupfile.c basename.c dirname.c eaccess.c \ |
5
|
31 error.c filemode.c fsusage.c getopt.c getopt1.c \ |
|
32 getversion.c idcache.c isdir.c makepath.c \ |
|
33 modechange.c mountlist.c savedir.c \ |
|
34 stripslash.c xgetcwd.c xmalloc.c xstrdup.c userspec.c yesno.c \ |
|
35 fileblocks.c fnmatch.c ftruncate.c mkdir.c mktime.c rename.c stpcpy.c \ |
|
36 strdup.c strstr.c alloca.c |
|
37 |
68
|
38 OBJECTS = getdate.o posixtm.o \ |
|
39 argmatch.o backupfile.o basename.o dirname.o eaccess.o \ |
5
|
40 error.o filemode.o getopt.o getopt1.o \ |
|
41 getversion.o idcache.o isdir.o makepath.o \ |
|
42 modechange.o savedir.o \ |
|
43 stripslash.o xgetcwd.o xmalloc.o xstrdup.o userspec.o yesno.o \ |
68
|
44 @LIBOBJS@ @ALLOCA@ |
5
|
45 |
|
46 DISTFILES = Makefile.in backupfile.h getopt.h modechange.h \ |
|
47 fnmatch.h fsusage.h mountlist.h pathmax.h system.h $(SOURCES) |
|
48 |
|
49 all: libfu.a |
|
50 |
|
51 .c.o: |
68
|
52 $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $< |
5
|
53 |
|
54 install: all |
|
55 |
|
56 uninstall: |
|
57 |
|
58 TAGS: $(SOURCES) |
|
59 etags $(SOURCES) |
|
60 |
68
|
61 check: |
|
62 |
5
|
63 clean: |
|
64 rm -f *.a *.o |
|
65 |
|
66 mostlyclean: clean |
|
67 |
|
68 distclean: clean |
|
69 rm -f Makefile *.tab.c getdate.c *posixtm.c |
|
70 |
|
71 realclean: distclean |
|
72 rm -f TAGS |
|
73 |
|
74 dist: |
56
|
75 for file in $(DISTFILES); do \ |
|
76 ln $$file ../`cat ../.fname`/lib \ |
63
|
77 || cp -p $$file ../`cat ../.fname`/lib; \ |
56
|
78 done |
5
|
79 |
|
80 libfu.a: $(OBJECTS) |
|
81 rm -f $@ |
|
82 $(AR) cr $@ $(OBJECTS) |
|
83 -$(RANLIB) $@ |
|
84 |
58
|
85 # Since this directory contains two parsers, we have to be careful to avoid |
|
86 # running two $(YACC)s during parallel makes. See below. |
5
|
87 getdate.c: getdate.y |
|
88 @echo expect 9 shift/reduce conflicts |
58
|
89 $(YACC) $(srcdir)/getdate.y |
|
90 mv y.tab.c getdate.c |
5
|
91 |
|
92 # Make the rename atomic, in case sed is interrupted and later rerun. |
58
|
93 # The artificial dependency on getdate.c keeps the two parsers from being |
|
94 # built in parallel. Enforcing this little bit of sequentiality lets |
|
95 # everyone (even those without bison) still run mostly parallel builds. |
|
96 posixtm.c: posixtm.y getdate.c |
|
97 $(YACC) $(srcdir)/posixtm.y |
|
98 mv y.tab.c posixtm.tab.c |
5
|
99 sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c |
|
100 mv tposixtm.c posixtm.c |
|
101 rm -f posixtm.tab.c |
|
102 |
|
103 backupfile.o getversion.o: backupfile.h |
|
104 fnmatch.o: fnmatch.h |
|
105 fsusage.o: fsusage.h |
|
106 getopt1.o: getopt.h |
|
107 modechange.o: modechange.h |
|
108 mountlist.o: mountlist.h |
|
109 xgetcwd.o: pathmax.h |
|
110 |
|
111 # Prevent GNU make v3 from overflowing arg limit on SysV. |
|
112 .NOEXPORT: |