Files
OpenSceneGraph/Make/instrules
Don BURNS e0adca775b Reinstated Norman Vine's TARGET_BASENAME variable in the makefiles and
added prefixes and suffixes to libs and plugins.  ALl this to accomodate
cygwin...

Also added INST_SYS_PREFIX and INST_SHARE_PREFIX for installation, as well
as "standardizing" the install locations for the various platforms.
2002-04-03 17:42:12 +00:00

127 lines
3.3 KiB
Plaintext

install : instbin instdev
instbin :
@$(MAKE) INSTSRC=$(TOPDIR)/bin INSTDEST=$(INST_DEMOS) \
INSTALL?="$(INSTBINCMD)" __install
@$(MAKE) INSTSRC=$(TOPDIR)/lib INSTDEST=$(INST_LIBS) \
INSTALL?="$(INSTBINCMD)" __install
@$(MAKE) INSTSRC=$(TOPDIR)/lib/osgPlugins INSTDEST=$(INST_PLUGINS)\
INSTALL?="$(INSTBINCMD)" __install
instdev :
@for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
do\
if [ -d $(TOPDIR)/include/$$d ]; \
then \
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d\
INSTALL?="$(INSTDEVCMD)" __install;\
fi\
done
@for d in `ls -1 $(TOPDIR)/src/Demos | grep -v CVS`; \
do\
if [ -d $(TOPDIR)/src/Demos/$$d ]; \
then \
$(MAKE) INSTSRC=$(TOPDIR)/src/Demos/$$d INSTDEST=$(INST_DEMO_SRC)/$$d\
INSTALL?="$(INSTDEVCMD)" __install;\
fi\
done
instlinks : instlinksbin instlinksdev
instlinksbin :
$(MAKE) INSTALL="$(INSTLINKBIN)" instbin
instlinksdev :
$(MAKE) INSTALL="$(INSTLINKDEV)" instdev
instclean : instcleanbin instcleandev
instcleanbin :
@$(MAKE) INSTSRC=$(TOPDIR)/bin INSTDEST=$(INST_DEMOS) \
INSTALL?="$(INSTBINCMD)" __instclean
@$(MAKE) INSTSRC=$(TOPDIR)/lib INSTDEST=$(INST_LIBS) \
INSTALL?="$(INSTBINCMD)" __instclean
@$(MAKE) INSTSRC=$(TOPDIR)/lib/osgPlugins INSTDEST=$(INST_PLUGINS)\
INSTALL?="$(INSTBINCMD)" __instclean
instcleandev :
@for d in `ls -1 $(TOPDIR)/include/ | grep -v CVS`; \
do\
if [ -d $(TOPDIR)/include/$$d ]; \
then \
$(MAKE) INSTSRC=$(TOPDIR)/include/$$d INSTDEST=$(INST_INCLUDE)/$$d\
INSTALL?="$(INSTDEVCMD)" __instclean;\
fi\
done
@for d in `ls -1 $(TOPDIR)/src/Demos | grep -v CVS`; \
do\
if [ -d $(TOPDIR)/src/Demos/$$d ]; \
then \
$(MAKE) INSTSRC=$(TOPDIR)/src/Demos/$$d INSTDEST=$(INST_DEMO_SRC)/$$d\
INSTALL?="$(INSTDEVCMD)" __instclean;\
fi\
done
__install :
@[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
@[ -n "$(INSTSRC)" ] && echo > /dev/null
@[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST definition)"
@[ -n "$(INSTDEST)" ] && echo > /dev/null
@[ -d $(INSTDEST) ] || mkdir -p $(INSTDEST)
@echo INSTSRC is $(INSTSRC)
@cd $(INSTSRC);\
THISDIR=`pwd`;\
if [ -n "`ls -1 | grep -v CVS`" ]; then\
for f in `ls -1 | grep -v CVS`; \
do\
if [ -f $$f ] ; \
then \
echo $(INSTALL) $$THISDIR/$$f $(INSTDEST);\
$(INSTALL) $$THISDIR/$$f $(INSTDEST);\
fi\
done\
fi
__instclean :
@[ -n "$(INSTSRC)" ] || echo "Internal error (INSTSRC definition)"
@[ -n "$(INSTSRC)" ] && echo > /dev/null
@[ -n "$(INSTDEST)" ] || echo "Internal error (INSTDEST definition)"
@[ -n "$(INSTDEST)" ] && echo > /dev/null
@if [ -d $(INSTDEST) ] ; \
then\
cd $(INSTSRC);\
if [ -n "`ls -1 | grep -v CVS`" ]; then\
for f in `ls -1 | grep -v CVS`; \
do\
if [ -f $$f ] ; \
then \
echo "rm -f $(INSTDEST)/$$f";\
rm -f $(INSTDEST)/$$f;\
fi\
done\
fi;\
empty=`ls $(INSTDEST)`;\
if [ -z "$$empty" ];\
then\
repeat=1;\
while [ $$repeat = 1 ] ; \
do \
printf "$(INSTDEST) is empty. Remove? (y/n) [y]: ";\
read resp;\
case $$resp in \
""|Yes|YES|yes|Y|y) rm -rf $(INSTDEST); repeat=0;; \
n|N|no|NO) repeat=0;; \
*) repeat=1;; \
esac\
done\
fi\
fi