From: chip Date: Wed, 12 Jan 2005 01:14:57 +0000 (+0000) Subject: Make symlinks, not hard links, to duplicated source files. X-Git-Tag: nfs-utils-1-0-7-post1~23 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=672a18a4f1dc2166707c06bac372d7ae04354c34 Make symlinks, not hard links, to duplicated source files. Remove those symlinks during distclean. --- diff --git a/utils/svcgssd/Makefile b/utils/svcgssd/Makefile index 8b330db..a864de0 100644 --- a/utils/svcgssd/Makefile +++ b/utils/svcgssd/Makefile @@ -10,12 +10,20 @@ LIBDEPS = $(TOP)support/lib/librpc.a $(TOP)support/lib/libgssapi.a LIBS = -Wl,-rpath=$(KRBDIR)/lib -lrpc -lgssapi -ldl $(KRBLIB) -lnfsidmap MAN8 = svcgssd -predep :: - - ln ../gssd/err_util.c - - ln ../gssd/gss_util.c - - ln ../gssd/gss_oids.c - - ln ../gssd/context.c - - ln ../gssd/context_heimdal.c +LINKED = err_util.c gss_util.c gss_oids.c context.c context_heimdal.c + +predep :: $(LINKED) + +$(LINKED) : + ln -s ../gssd/$@ . + +distclean :: + for f in $(LINKED); do \ + if [ -L "$$f" ]; then \ + echo "rm -f $$f"; \ + rm -f "$$f"; \ + fi; \ + done include $(TOP)rules.mk