From aa60b32c1c1eaf8bf9dd2331c1c96f4422164ef3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 30 Jul 1994 13:18:39 +0000 Subject: [PATCH] . --- lib/Makefile.in | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/lib/Makefile.in b/lib/Makefile.in index 7607694..32c3d9b 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,5 +1,5 @@ -# Makefile for library files used by GNU fileutils. -# Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. +# Makefile for library files used by GNU file utilities. +# Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ VPATH = @srcdir@ CC = @CC@ AR = ar RANLIB = @RANLIB@ -DEFS = -Dlint -DCONFIG_BROKETS @DEFS@ +DEFS = -DCONFIG_BROKETS -Dlint @DEFS@ CFLAGS = @CFLAGS@ YACC = @YACC@ @@ -44,15 +44,19 @@ OBJECTS = getdate.o posixtm.o \ argmatch.o backupfile.o basename.o dirname.o eaccess.o \ error.o filemode.o full-write.o getopt.o getopt1.o \ getversion.o group-member.o idcache.o isdir.o long-options.o makepath.o \ -modechange.o safe-read.o savedir.o \ +modechange.o safe-read.o safe-stat.o safe-lstat.o savedir.o \ stripslash.o xgetcwd.o xmalloc.o xstrdup.o userspec.o yesno.o \ @LIBOBJS@ @ALLOCA@ DISTFILES = Makefile.in backupfile.h getopt.h modechange.h \ -fnmatch.h fsusage.h mountlist.h pathmax.h $(SOURCES) +fnmatch.h fsusage.h mountlist.h pathmax.h safe-xstat.c.in safe-xstat.h.in \ +$(SOURCES) all: libfu.a +.SUFFIXES = +.SUFFIXES = .c .o + .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) -I.. -I$(srcdir) $(CFLAGS) $< @@ -77,12 +81,13 @@ distclean: clean rm -f Makefile *.tab.c getdate.c *posixtm.c realclean: distclean - rm -f TAGS + rm -f TAGS safe-stat.c safe-stat.h safe-lstat.c safe-lstat.h +distdir = ../`cat ../.fname`/lib dist: $(DISTFILES) for file in $(DISTFILES); do \ - ln $$file ../`cat ../.fname`/lib \ - || cp -p $$file ../`cat ../.fname`/lib; \ + ln $$file $(distdir) \ + || { echo copying $$file instead; cp -p $$file $(distdir);}; \ done libfu.a: $(OBJECTS) @@ -90,6 +95,28 @@ libfu.a: $(OBJECTS) $(AR) cr $@ $(OBJECTS) -$(RANLIB) $@ +extract_stat = sed -e 's/@l@//g' -e 's/@L@//g' +extract_lstat = sed -e 's/@l@/l/g' -e 's/@L@/L/g' + +safe-lstat.c: safe-xstat.c.in + $(extract_lstat) safe-xstat.c.in > $@-tmp + mv $@-tmp $@ + +safe-lstat.h: safe-xstat.h.in + $(extract_lstat) safe-xstat.h.in > $@-tmp + mv $@-tmp $@ + +safe-stat.c: safe-xstat.c.in + $(extract_stat) safe-xstat.c.in > $@-tmp + mv $@-tmp $@ + +safe-stat.h: safe-xstat.h.in + $(extract_stat) safe-xstat.h.in > $@-tmp + mv $@-tmp $@ + +safe-stat.o: safe-stat.h +safe-lstat.o: safe-lstat.h + # Since this directory contains two parsers, we have to be careful to avoid # running two $(YACC)s during parallel makes. See below. getdate.c: getdate.y -- 2.7.4