Commit 0402c28a authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

Merge branch 'master' into gremlin

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/branches/gremlin
SVN Revision: 5491
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parents 13d74c61 624bdaa7
......@@ -111,6 +111,9 @@ export FFLAGS="-ff2c -Wall -ffixed-line-length-0 -fno-backslash"
# when switching to another branch <anybranch>
export SVNTF=http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware
# path to pure git export repository (used in Makefile.packages - see there)
export GITTFSEXPORT=$HOME/git/TFSoftware.export
# place to drop packages
export TF_PUBLICATIONPATH=$HOME/public_html/download/software
......
......@@ -30,6 +30,8 @@
# install.sh
# 23/10/2013 V1.10 - moved static content of install.sh to script template
# - install.sh reports sources to be installed
# 18/01/2014 V1.11 provide a mode for local package creation without
# subversion repository access; this mode uses git
#
#----------------------------------------------------------------------
# Notice
......@@ -102,6 +104,11 @@
# PACKAGESRCONLY: this variable is optional; if set, only a source code
# package with install.sh script is created; the install
# script is not executed
# PACKAGELOCAL: this variable is optional; if set, a local git
# repository is used to obtain source code from; this is
# implemented for testing package creation off-line;
# packages created for publication should not be created
# with this option (see below for details)
#
# variables which are expected to be set in the shell environment
# ---------------------------------------------------------------
......@@ -116,6 +123,9 @@
# SERVERBINDIR, SERVERLIBDIR, and SERVERINCLUDEDIR
# upon compilation of binaries
#
# GITTFSEXPORT path to local git export repository
# this is only required in PACKAGELOCAL mode
#
#----------------------------------------------------------------------
#
# When building and installing files, the environment variables will be set to
......@@ -181,14 +191,27 @@
# execute successfully.
#
# ============================================================================
# PACKAGELOCAL
# ------------
# Description of the local package creation (for testing purposes) in the
# PACKAGELOCAL=yes mode.
#
# This mode is implemented to support package creation off-line, i.e. without
# access to the subversion repository. In this case a local git export
# repository is used. A variable GITTFSEXPORT is expected to contain a path
# to a git repository, which is already switched to an appropriate branch
# which tracks a remote branch where recent modifications are available.
# All repository contents then are not obtained by "svn export" but by
# copying from the local directory of the git repository.
#
# For this purpose a "git pull" is executed in ths git repository and the
# working tree is checked for untracked files. If such files are present,
# this is considered a fatal error.
#
# ============================================================================
#
# first of all: check all required variables
.PHONY: package
package:
$(MAKE) -f $(TF_MAKEPKG) packageclean
$(MAKE) -f $(TF_MAKEPKG) publish
#----------------------------------------------------------------------
# set macros if not set yet
ifndef CHECKVAR
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
......@@ -200,6 +223,26 @@ endif
$(call CHECKVARS,PACKAGE SVNTF TF_PUBLICATIONPATH)
$(call CHECKVARS,PACKAGETARGETS PACKAGEEXPORT TF_MAKEPKG PACKAGELIBS)
$(call CHECKVARS,LOCBINDIR LOCINCLUDEDIR LOCLIBDIR)
ifdef PACKAGELOCAL
$(call CHECKVARS,GITTFSEXPORT)
endif
#----------------------------------------------------------------------
# if package creation exits here in PACKAGELOCAL mode, your git export
# directory probably contains local untracked files!
.PHONY: package
package:
$(MAKE) -f $(TF_MAKEPKG) packageclean
ifdef PACKAGELOCAL
cd $(GITTFSEXPORT); git pull
@echo
@echo "if package creation aborts here in PACKAGELOCAL mode, your"
@echo "git export directory propably contains local untracked files"
@echo
cd $(GITTFSEXPORT); exit $$(git status --ignored | egrep -v '^# On branch' | egrep -v '^nothing to commit, working directory clean' | wc -l)
endif
$(MAKE) -f $(TF_MAKEPKG) publish
#----------------------------------------------------------------------
# basic preparation
......@@ -249,8 +292,13 @@ printexport:
.PHONY: $(EXPORTLIST)
$(EXPORTLIST):
mkdir -pv $(dir $(TMPPATH)/$(word 2,$(subst .EXPORTTO., ,$@)))
ifndef PACKAGELOCAL
svn export $(SVNTF)/$(word 1,$(subst .EXPORTTO., ,$@)) \
$(TMPPATH)/$(word 2,$(subst .EXPORTTO., ,$@))
else
/bin/cp -vprd $(GITTFSEXPORT)/$(subst trunk/,,$(word 1,$(subst .EXPORTTO., ,$@))) \
$(TMPPATH)/$(word 2,$(subst .EXPORTTO., ,$@))
endif
#======================================================================
# provide information files
......@@ -274,7 +322,11 @@ INFOFILESFROMSVN=$(notdir $(INFOFILESFROMSVNWITHPATH))
# rule for the creation of README files from the repository (i.e svn export)
$(addprefix $(TMPPATH)/,$(INFOFILESFROMSVN)):
mkdir -pv $(dir $@)
ifndef PACKAGELOCAL
svn export $(SVNTF)/trunk/$(filter %$(notdir $@),$(INFOFILESFROMSVNWITHPATH)) $@
else
/bin/cp -vprd $(GITTFSEXPORT)/$(filter %$(notdir $@),$(INFOFILESFROMSVNWITHPATH)) $@
endif
# README.system
# information on system where this package was created on
......@@ -308,8 +360,13 @@ $(TMPPATH)/README.system:
(echo -n "$(CXX): "; $(CXX) --version) 2>&1 | head -1 >> $@
(echo -n "$(CPP): "; $(CPP) --version) 2>&1 | head -1 >> $@
(echo -n "$(FC): "; $(FC) --version) 2>&1 | head -1 >> $@
ifndef PACKAGELOCAL
echo -e "\nThe snapshot was taken from:" >> $@
svn info $(SVNTF) >> $@
else
echo -e "\nPackage creation in local mode from git repository:">> $@
cd $(GITTFSEXPORT); git remote show $$(git remote) >> $@
endif
echo -e "\nThe snapshot contains code from the following repository directories:" >> $@
echo $(EXPORTSVNLIST) | fold -w 70 -s | sed -e "s/^/ /" >> $@
......
Markdown is supported
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