Commit 35a5992f authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

reporting sources to be compiled and installed

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5291
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent cf06f34b
......@@ -28,7 +28,8 @@
# 05/12/2012 V1.8 added PACKAGESRCONLY switch flag
# 21/03/2013 V1.9 set reasonable local target directories for
# install.sh
# 23/10/2013 V1.10 moved static content of install.sh to script template
# 23/10/2013 V1.10 - moved static content of install.sh to script template
# - install.sh reports sources to be installed
#
#----------------------------------------------------------------------
# Notice
......@@ -337,10 +338,16 @@ LIBDOC=$(foreach lib,$(THEPACKAGELIBS),contrib/$(lib):doc:-i)
LIBTARGETS=$(LIBINSTALL) $(LIBREINSTALL) $(LIBDOC)
TARGETLIST=$(subst :,.MAKETARGET.,$(LIBTARGETS) $(THEPACKAGETARGETS))
SOURCEDIRS=$(sort $(foreach TGT,$(THEPACKAGETARGETS),$(word 1,$(subst :, ,$(TGT)))))
# control target to printout the assembled list
.PHONY: printtargets
printtargets:
echo $(TARGETLIST)
# control target to printout the assembled list
.PHONY: printsourcedirs
printsourcedirs:
echo $(SOURCEDIRS)
# prepare the contents of the install script
# for each target in $(TARGETLIST) a command sequence is added to
......@@ -370,10 +377,22 @@ $(TARGETLIST):
# additionally it is provided to the package user to support reinstallation
$(TMPPATH)/install.sh: $(TMPPATH)/template_install.sh $(TARGETLIST)
/bin/mv $< $@
echo '# install script of package $(THEPACKAGE)' >> $@
echo '# install script for package $(THEPACKAGE)' >> $@
echo '# ============================================================================' >> $@
echo 'echo' >> $@
echo 'echo This script will install package $(THEPACKAGE)' >> $@
echo 'echo' >> $@
echo 'echo Code from the following directories will be compiled and installed:' >> $@
echo 'echo $(SOURCEDIRS) | fold -w 70 -s | sed -e "s/^/ /"' >> $@
ifneq ($(words $(THEPACKAGELIBS)),0)
echo 'The following libraries will be installed from source code in contrib:' >> $@
echo 'echo $(THEPACKAGELIBS) | fold -w 70 -s | sed -e "s/^/ /"' >> $@
endif
echo 'echo' >> $@
/bin/bash -c 'if test -e $(TARGETSCRIPT); \
then \
echo echo "Please press enter to start the installation..." >> $@;\
echo read a >> $@;\
cat $(TARGETSCRIPT) >> $@; \
else \
echo echo "This package must be installed manually. Sorry..." >> $@;\
......@@ -389,7 +408,7 @@ $(TMPPATH)/install.sh: $(TMPPATH)/template_install.sh $(TARGETLIST)
.PHONY: executeinstall
executeinstall: $(TMPPATH)/install.sh
ifndef PACKAGESRCONLY
/bin/bash -c 'cd $(TMPPATH); ./install.sh'
/bin/bash -c 'cd $(TMPPATH); echo yes | ./install.sh'
endif
#======================================================================
......
......@@ -22,11 +22,6 @@ then
echo " call install.sh from within the directory in which it is located"
exit 2
fi
# shell function to print a list
printlist()
{
echo $* | fold -s -w 70
}
# target directories are defined in install.bashrc
test -s ./install.bashrc && . ./install.bashrc || true
# ============================================================================
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment