rules.mk: Better installation rules for exe targets

This commit is contained in:
Jan Lindemann 2002-01-31 23:05:45 +00:00 committed by Jan Lindemann
commit 9d9512d506

View file

@ -11,7 +11,7 @@ echo_all:
all.done: $(PREREQ_DONE) all all.done: $(PREREQ_DONE) all
touch $@ touch $@
%.done: %.done:
make -C $(shell dirname $@) `basename $@` make -C $(shell dirname $@) `basename $@`
$(LIBDIR): $(LIBDIR):
@ -46,6 +46,9 @@ $(LIBS):
$(PREFIX)/lib/%.so: %.so $(PREFIX)/lib/%.so: %.so
$(INSTALL) $< $@ $(INSTALL) $< $@
$(PREFIX)/bin/$(EXE): $(EXE)
$(INSTALL) $(EXE) $(PREFIX)/bin/
checkroot: checkroot:
@if [ "$(CHECK_ROOT)" = true -o "$(CHECK_ROOT)" = TRUE ] ; then \ @if [ "$(CHECK_ROOT)" = true -o "$(CHECK_ROOT)" = TRUE ] ; then \
echo "Error: You can only do this if either" ;\ echo "Error: You can only do this if either" ;\
@ -53,8 +56,7 @@ checkroot:
echo " b) the Makefile variable CHECK_ROOT does not contain \"true\" as value." ;\ echo " b) the Makefile variable CHECK_ROOT does not contain \"true\" as value." ;\
fi fi
installexe: all checkroot $(PREFIX)/bin installexe: all checkroot $(PREFIX)/bin/$(EXE)
$(INSTALL) $(EXE) $(PREFIX)/bin/
installso: all checkroot $(PREFIX)/lib $(INSTALLED_SHOBJS) installso: all checkroot $(PREFIX)/lib $(INSTALLED_SHOBJS)