(get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Copy untruncated block
[gnulib.git] / lib / Makefile.in
1 # Makefile for library files used by GNU file utilities.
2 # Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
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
23 CC = @CC@
24 AR = ar
25 RANLIB = @RANLIB@
26 DEFS = @DEFS@
27 CFLAGS = @CFLAGS@
28 YACC = @YACC@
29
30 exec_prefix = @exec_prefix@
31 libdir = $(exec_prefix)/lib
32
33 SOURCES = getdate.y posixtm.y \
34 argmatch.c backupfile.c basename.c dirname.c euidaccess.c \
35 error.c filemode.c fsusage.c full-write.c getopt.c getopt1.c \
36 getversion.c group-member.c idcache.c isdir.c makepath.c \
37 modechange.c mountlist.c obstack.c safe-read.c savedir.c \
38 stripslash.c xgetcwd.c xmalloc.c xstrdup.c userspec.c yesno.c \
39 fileblocks.c fnmatch.c ftruncate.c mkdir.c mktime.c rename.c rmdir.c \
40 save-cwd.c stpcpy.c \
41 strdup.c strstr.c strtol.c alloca.c long-options.c \
42 memcmp.c memcpy.c memset.c xstrtol.c xstrtoul.c
43
44 OBJECTS = getdate.o posixtm.o \
45 argmatch.o backupfile.o basename.o dirname.o \
46 error.o filemode.o full-write.o getopt.o getopt1.o \
47 getversion.o group-member.o idcache.o isdir.o long-options.o makepath.o \
48 modechange.o obstack.o safe-read.o save-cwd.o savedir.o \
49 stripslash.o xgetcwd.o xmalloc.o xstrdup.o userspec.o yesno.o \
50 xstrtol.o xstrtoul.o @LIBOBJS@ @ALLOCA@
51
52 DISTFILES = Makefile.in backupfile.h getopt.h long-options.h modechange.h \
53 fnmatch.h fsusage.h group-member.h makepath.h mountlist.h obstack.h pathmax.h \
54 save-cwd.h getdate.c posixtm.c error.h xstrtol.h xstrtoul.h $(SOURCES)
55
56 all: libfu.a
57
58 .SUFFIXES:
59 .SUFFIXES: .c .o
60
61 .c.o:
62         $(CC) -c $(CPPFLAGS) $(DEFS) -I.. -I$(srcdir) $(CFLAGS) $<
63
64 subdir = lib
65 Makefile: ../config.status Makefile.in
66         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
67
68 installdirs:
69
70 install install-exec install-data: all
71
72 uninstall:
73
74 TAGS: $(SOURCES)
75         etags $(SOURCES)
76
77 check:
78
79 clean:
80         rm -f *.a *.o
81
82 mostlyclean: clean
83
84 distclean: clean
85         rm -f Makefile *.tab.c tposixtm.c
86
87 maintainer-clean: distclean
88         rm -f TAGS getdate.c posixtm.c
89
90 distdir = ../`cat ../distname`/$(subdir)
91 dist: $(DISTFILES)
92         for file in $(DISTFILES); do \
93           ln $$file $(distdir) \
94             || { echo copying $$file instead; cp -p $$file $(distdir);}; \
95         done
96
97 libfu.a: $(OBJECTS)
98         rm -f $@
99         $(AR) cr $@ $(OBJECTS)
100         -$(RANLIB) $@
101
102 # Since this directory contains two parsers, we have to be careful to avoid
103 # running two $(YACC)s during parallel makes.  See below.
104 getdate.c: getdate.y
105         @echo expect 10 shift/reduce conflicts
106         $(YACC) $(srcdir)/getdate.y
107         mv y.tab.c getdate.c
108
109 # Make the rename atomic, in case sed is interrupted and later rerun.
110 # The artificial dependency on getdate.c keeps the two parsers from being
111 # built in parallel.  Enforcing this little bit of sequentiality lets
112 # everyone (even those without bison) still run mostly parallel builds.
113 posixtm.c: posixtm.y getdate.c
114         $(YACC) $(srcdir)/posixtm.y
115         mv y.tab.c posixtm.tab.c
116         sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
117         mv tposixtm.c posixtm.c
118         rm -f posixtm.tab.c
119
120 rename.o: rename.c
121         $(CC) -c $(CPPFLAGS) -DMVDIR="\"$(libdir)/mvdir\"" $(DEFS) \
122             -I.. -I$(srcdir) $(CFLAGS) $(srcdir)/rename.c
123
124 $(OBJECTS): ../config.h
125
126 backupfile.o getversion.o: backupfile.h
127 fnmatch.o: fnmatch.h
128 fsusage.o: fsusage.h
129 getopt1.o: getopt.h
130 modechange.o: modechange.h
131 mountlist.o: mountlist.h
132 xgetcwd.o: pathmax.h
133 makepath.o: makepath.h
134 obstack.o: obstack.h
135 group-member.o: group-member.h
136
137 .PHONY: all check clean dist distclean install install-data install-exec \
138 installdirs maintainer-clean mostlyclean uninstall
139
140 # Tell versions [3.59,3.63) of GNU make not to export all variables.
141 # Otherwise a system limit (for SysV at least) may be exceeded.
142 .NOEXPORT: