split links out into a sep target so implicit rules dont cause problems
This commit is contained in:
parent
cb2959ef76
commit
5e28066929
14
src/Makefile
14
src/Makefile
@ -84,6 +84,7 @@ RC_SBINLINKS = mark_service_starting mark_service_inactive \
|
|||||||
get_options save_options rc-abort
|
get_options save_options rc-abort
|
||||||
BINLINKS = rc-status
|
BINLINKS = rc-status
|
||||||
SBINLINKS = env-update rc-update runscript start-stop-daemon
|
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
|
# We also define _BSD_SOURCE so both Linux and the BSDs get a few
|
||||||
# handy functions which makes our lives a lot easier
|
# handy functions which makes our lives a lot easier
|
||||||
@ -122,8 +123,9 @@ $(RCOBJS):
|
|||||||
rc: $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS)
|
rc: $(LIBEINFOSO) $(LIBRCSO) $(RCOBJS)
|
||||||
$(CC) $(LDFLAGS) -o rc $(RCOBJS) $(LDLIBS) $(LDLIBS_RC)
|
$(CC) $(LDFLAGS) -o rc $(RCOBJS) $(LDLIBS) $(LDLIBS_RC)
|
||||||
|
|
||||||
links: rc
|
$(ALL_LINKS): rc
|
||||||
for x in $(BINLINKS) $(SBINLINKS) $(RC_BINLINKS) $(RC_SBINLINKS); do ln -sf rc $$x; done
|
ln -sf rc $@
|
||||||
|
links: $(ALL_LINKS)
|
||||||
|
|
||||||
install: $(TARGET)
|
install: $(TARGET)
|
||||||
install -m 0755 -d $(DESTDIR)/$(LIB)
|
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 ; \
|
install -m 0644 start-stop-daemon.pam $(DESTDIR)/etc/pam.d/start-stop-daemon ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean:
|
clean-links:
|
||||||
rm -f $(TARGET) $(BINLINKS) $(SBINLINKS) $(RCLINKS) $(RCPRIVLINKS)
|
rm -f $(ALL_LINKS)
|
||||||
|
clean: clean-links
|
||||||
|
rm -f $(TARGET)
|
||||||
rm -f *.o *~ *.core *.so .depend
|
rm -f *.o *~ *.core *.so .depend
|
||||||
|
|
||||||
-include .depend
|
-include .depend
|
||||||
@ -158,4 +162,4 @@ _DEPS != ls *.c *.h
|
|||||||
.depend: $(_DEPS)$(wildcard *.c *.h)
|
.depend: $(_DEPS)$(wildcard *.c *.h)
|
||||||
$(CC) $(CPPFLAGS) -MM *.c > .depend
|
$(CC) $(CPPFLAGS) -MM *.c > .depend
|
||||||
|
|
||||||
.PHONY: all clean install links
|
.PHONY: all clean clean-links install links
|
||||||
|
Loading…
Reference in New Issue
Block a user