diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-09-25 01:42:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-09-25 01:42:24 +0000 |
commit | 5e2806692955b728f70705f9a71f41781db7fd74 (patch) | |
tree | 1feb41bbffdf656ee410f54bb5945dd59e99791e /src/Makefile | |
parent | cb2959ef76ec8bae2fb1eb2511ac8581f2ca448d (diff) |
split links out into a sep target so implicit rules dont cause problems
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile index 288e43d8..4807ed03 100644 --- a/src/Makefile +++ b/src/Makefile @@ -84,6 +84,7 @@ RC_SBINLINKS = mark_service_starting mark_service_inactive \ get_options save_options rc-abort BINLINKS = rc-status SBINLINKS = env-update rc-update runscript start-stop-daemon +ALL_LINKS = $(sort $(BINLINKS) $(SBINLINKS) $(RC_BINLINKS) $(RC_SBINLINKS)) # We also define _BSD_SOURCE so both Linux and the BSDs get a few # handy functions which makes our lives a lot easier @@ -122,8 +123,9 @@ $(RCOBJS): rc: $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS) $(CC) $(LDFLAGS) -o rc $(RCOBJS) $(LDLIBS) $(LDLIBS_RC) -links: rc - for x in $(BINLINKS) $(SBINLINKS) $(RC_BINLINKS) $(RC_SBINLINKS); do ln -sf rc $$x; done +$(ALL_LINKS): rc + ln -sf rc $@ +links: $(ALL_LINKS) install: $(TARGET) install -m 0755 -d $(DESTDIR)/$(LIB) @@ -149,8 +151,10 @@ install: $(TARGET) install -m 0644 start-stop-daemon.pam $(DESTDIR)/etc/pam.d/start-stop-daemon ; \ fi -clean: - rm -f $(TARGET) $(BINLINKS) $(SBINLINKS) $(RCLINKS) $(RCPRIVLINKS) +clean-links: + rm -f $(ALL_LINKS) +clean: clean-links + rm -f $(TARGET) rm -f *.o *~ *.core *.so .depend -include .depend @@ -158,4 +162,4 @@ _DEPS != ls *.c *.h .depend: $(_DEPS)$(wildcard *.c *.h) $(CC) $(CPPFLAGS) -MM *.c > .depend -.PHONY: all clean install links +.PHONY: all clean clean-links install links |