BUILD_ROOT=@NEOCCA_BUILD_ROOT@ BUILDDIRS= src CLEANDIRS= src lib include BUILDDOCS= doc # rerun configure with a different --prefix=... to change INSTALL_ROOT. # default is current directory. # DESTDIR is a gnu standard config directory that is the destination root. # INSTALL_ROOT= $(DESTDIR)@NEOCCA_INSTALL_ROOT@ PKG_NAME=@PKG_NAME@ PROG_SUFFIX=-@NEOCCA_VERSION@ LIBTOOL=@BABEL_LIBTOOL@ INSTALL_FILES= \ src/test-script-ccafe.scr \ src/CCA_Neo_Vars.sh \ src/MakeIncl_CCA_Neo_Vars INSTALL_BINS= \ bld2neo.tcl \ bld2neo \ scanCCAxml.x \ genNeoXML \ genNeoComponentIndex \ cca-spec-neo-config LN_S=@LN_S@ INSTALL=@INSTALL@ INSTALL_DATA=@INSTALL_DATA@ all: done: @echo "#======================================" @echo "Done with our best shot at everything." @echo "#======================================" # check the existence of the install root location $(INSTALL_ROOT): @if test ! -d $(INSTALL_ROOT) ; then \ echo "Creating $(INSTALL_ROOT)"; \ else \ echo "Creating $(INSTALL_ROOT) already done."; \ fi @-mkdir -p $(INSTALL_ROOT) @if test ! -d $(INSTALL_ROOT) ; then \ echo "Unable to create $(INSTALL_ROOT)"; \ exit 1 ; \ fi @if test ! -w $(INSTALL_ROOT) ; then \ echo "* * * You don't have permission to install in $(INSTALL_ROOT)" ; \ exit 1 ; \ fi install: $(INSTALL_ROOT) install-files install-libs install-docs INSTALL_SUBDIRS= \ bin \ lib \ include \ include/$(PKG_NAME) \ include/$(PKG_NAME)/neobase \ include/$(PKG_NAME)/neoports \ include/$(PKG_NAME)/neosupport \ share \ share/$(PKG_NAME) \ share/doc \ share/doc/$(PKG_NAME) \ share/doc/$(PKG_NAME)/c++ install-subdirs: $(INSTALL_ROOT) @for i in $(INSTALL_SUBDIRS) /dev/null ; do \ if test $$i != "/dev/null" ; then \ if test ! -d $(INSTALL_ROOT)/$$i; then \ echo "Creating $(INSTALL_ROOT)/$$i"; \ mkdir -p $(INSTALL_ROOT)/$$i ; \ chmod 755 $(INSTALL_ROOT)/$$i; \ fi; \ fi ; \ done install-libs: install-subdirs @if test "x$(INSTALL_ROOT)" = "x." -o "x$(INSTALL_ROOT)" = "x$(BUILD_ROOT)"; then \ echo "skipping libs-- installing in self requested"; \ else \ $(INSTALL) lib/@NEOCCA_SHARED_LIB@ $(INSTALL_ROOT)/lib/@NEOCCA_SHARED_LIB@; \ $(INSTALL_DATA) lib/@NEOCCA_STATIC_LIB@ $(INSTALL_ROOT)/lib/@NEOCCA_STATIC_LIB@; \ fi install-files: install-subdirs @for i in $(INSTALL_FILES) /dev/null ; do \ if test $$i != "/dev/null" -a -f $$i ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(INSTALL_ROOT)/share/$(PKG_NAME) ; \ fi ; \ done @for i in $(INSTALL_BINS) /dev/null ; do \ if test $$i != "/dev/null" -a -f src/$$i ; then \ echo "Installing $$i"; \ cp src/$$i src/$${i}$(PROG_SUFFIX) ; \ $(INSTALL) src/$${i}$(PROG_SUFFIX) $(INSTALL_ROOT)/bin ; \ if ! test -x $(INSTALL_ROOT)/bin/$$i ; then \ echo "Creating sym-link$ $(INSTALL_ROOT)/bin/$${i}" ; \ (pushd $(INSTALL_ROOT)/bin; $(LN_S) $${i}$(PROG_SUFFIX) $${i} ; popd) \ else \ echo "Replacing existing file or link $(INSTALL_ROOT)/bin/$${i}"; \ (pushd $(INSTALL_ROOT)/bin; mv $${i} $${i}.`date '+%Y%m%d_%H_%M_%S'`; popd) ; \ (pushd $(INSTALL_ROOT)/bin; $(LN_S) $${i}$(PROG_SUFFIX) $${i} ; popd) \ fi ; \ else \ if test $$i != "/dev/null" ; then \ echo "!Error: Cannot find $$i to install from src/."; \ fi ; \ fi ; \ done @(flist=`ls -1 include/*.hh`; \ for i in $$flist /dev/null ; do \ if test $$i != "/dev/null" -a -f $$i ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(INSTALL_ROOT)/include/$(PKG_NAME) ; \ fi ; \ done) @(flist=`ls -1 include/neobase/*.hh`; \ for i in $$flist /dev/null ; do \ if test $$i != "/dev/null" -a -f $$i ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(INSTALL_ROOT)/include/$(PKG_NAME)/neobase ; \ fi ; \ done) @(flist=`ls -1 include/neosupport/*.hh`; \ for i in $$flist /dev/null ; do \ if test $$i != "/dev/null" -a -f $$i ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(INSTALL_ROOT)/include/$(PKG_NAME)/neosupport ; \ fi ; \ done) @(flist=`ls -1 include/neoports/*.hh`; \ for i in $$flist /dev/null ; do \ if test $$i != "/dev/null" -a -f $$i ; then \ echo "Installing $$i"; \ $(INSTALL_DATA) $$i $(INSTALL_ROOT)/include/$(PKG_NAME)/neoports ; \ fi ; \ done) install-docs: install-subdirs @if test -d dox/html ; then \ cp -r dox/html dox/man $(INSTALL_ROOT)/share/doc/$(PKG_NAME)/c++ ; \ fi .PHONY: $(INSTALL_ROOT)