Commit 346d082c authored by Marcel Rieger's avatar Marcel Rieger

Add new makePxl bundle script, add .hgignore.

parent 7fa0e8e4
syntax: glob
.*project
hg-checklink*
#!/bin/sh
# merge pxl into ONE cc and ONE hh.
# execute from PXL basedir.
#!/usr/bin/env bash
if [ -n "$RELEASE_TOOLS" ]; then
svn export --username "$SVN_USER" --password "$SVN_PASSWORD" \
"$SVN_URL/$RELEASE_TOOLS/trunk/merge.py" || return 1
BASE=.
else
BASE=`dirname $0`
fi
# merge pxl into one *.cc and one *.h file
# execute in the pxl base directory
PXL_MAJOR_VERSION=`cat configure.in | grep "PXL_MAJOR_VERSION="`
PXL_MINOR_VERSION=`cat configure.in | grep "PXL_MINOR_VERSION="`
PXL_EXTRA_VERSION=`cat configure.in | grep "PXL_EXTRA_VERSION="`
BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PXL_MAJOR_VERSION=`echo ${PXL_MAJOR_VERSION#P*=}`
PXL_MINOR_VERSION=`echo ${PXL_MINOR_VERSION#P*=}`
PXL_EXTRA_VERSION=`echo ${PXL_EXTRA_VERSION#P*=}`
# define the target files
HEADER_FILE=Pxl.h
SOURCE_FILE=Pxl.cc
echo "//-------------------------------------------" > PXL.hh
echo -n "// PXL header bundle, version " >> PXL.hh
echo -n $PXL_MAJOR_VERSION >> PXL.hh
echo -n "." >> PXL.hh
echo -n $PXL_MINOR_VERSION >> PXL.hh
echo -n "." >> PXL.hh
echo -n $PXL_EXTRA_VERSION >> PXL.hh
echo " -" >> PXL.hh
echo -n "// Created on " >> PXL.hh
echo -n `date` >> PXL.hh
echo " -" >> PXL.hh
echo "//-------------------------------------------" >> PXL.hh
# delete already present files
rm -f $HEADER_FILE
rm -f $SOURCE_FILE
echo "//-------------------------------------------" > PXL.cc
echo -n "// PXL source bundle, version " >> PXL.cc
echo -n $PXL_MAJOR_VERSION >> PXL.cc
echo -n "." >> PXL.cc
echo -n $PXL_MINOR_VERSION >> PXL.cc
echo -n "." >> PXL.cc
echo -n $PXL_EXTRA_VERSION >> PXL.cc
echo " -" >> PXL.cc
echo -n "// Created on " >> PXL.cc
echo -n `date` >> PXL.cc
echo " -" >> PXL.cc
echo "//-------------------------------------------" >> PXL.cc
# create the merged header file
python $BASE/merge.py -frR -I build/include -I core/include -I hep/include core/include/pxl/core.hh hep/include/pxl/hep.hh > $HEADER_FILE
python $BASE/merge.py -frR -I pxl/include -I hep/include -I astro/include pxl/include/pxl/pxl.hh >> PXL.hh
python $BASE/merge.py -rR -e PXL.hh -I pxl/include -I hep/include -I astro/include pxl/src/base/*.cc pxl/src/io/*.cc hep/src/*.cc astro/src/*.cc >> PXL.cc
if [ -n "$RELEASE_TOOLS" ]; then
zip -9 ../PXL.zip PXL.{cc,hh}
fi
# create the merged source file
python $BASE/merge.py -rR -e $HEADER_FILE -I core/include -I hep/include core/src/*.cc hep/src/*.cc > $SOURCE_FILE
#!/bin/sh
# merge pxl into ONE cc and ONE hh.
# execute from PXL basedir.
if [ -n "$RELEASE_TOOLS" ]; then
svn export --username "$SVN_USER" --password "$SVN_PASSWORD" \
"$SVN_URL/$RELEASE_TOOLS/trunk/merge.py" || return 1
BASE=.
else
BASE=`dirname $0`
fi
PXL_MAJOR_VERSION=`cat configure.in | grep "PXL_MAJOR_VERSION="`
PXL_MINOR_VERSION=`cat configure.in | grep "PXL_MINOR_VERSION="`
PXL_EXTRA_VERSION=`cat configure.in | grep "PXL_EXTRA_VERSION="`
PXL_MAJOR_VERSION=`echo ${PXL_MAJOR_VERSION#P*=}`
PXL_MINOR_VERSION=`echo ${PXL_MINOR_VERSION#P*=}`
PXL_EXTRA_VERSION=`echo ${PXL_EXTRA_VERSION#P*=}`
echo "//-------------------------------------------" > PXL.hh
echo -n "// PXL header bundle, version " >> PXL.hh
echo -n $PXL_MAJOR_VERSION >> PXL.hh
echo -n "." >> PXL.hh
echo -n $PXL_MINOR_VERSION >> PXL.hh
echo -n "." >> PXL.hh
echo -n $PXL_EXTRA_VERSION >> PXL.hh
echo " -" >> PXL.hh
echo -n "// Created on " >> PXL.hh
echo -n `date` >> PXL.hh
echo " -" >> PXL.hh
echo "//-------------------------------------------" >> PXL.hh
echo "//-------------------------------------------" > PXL.cc
echo -n "// PXL source bundle, version " >> PXL.cc
echo -n $PXL_MAJOR_VERSION >> PXL.cc
echo -n "." >> PXL.cc
echo -n $PXL_MINOR_VERSION >> PXL.cc
echo -n "." >> PXL.cc
echo -n $PXL_EXTRA_VERSION >> PXL.cc
echo " -" >> PXL.cc
echo -n "// Created on " >> PXL.cc
echo -n `date` >> PXL.cc
echo " -" >> PXL.cc
echo "//-------------------------------------------" >> PXL.cc
python $BASE/merge.py -frR -I pxl/include -I hep/include -I astro/include pxl/include/pxl/pxl.hh >> PXL.hh
python $BASE/merge.py -rR -e PXL.hh -I pxl/include -I hep/include -I astro/include pxl/src/base/*.cc pxl/src/io/*.cc hep/src/*.cc astro/src/*.cc >> PXL.cc
if [ -n "$RELEASE_TOOLS" ]; then
zip -9 ../PXL.zip PXL.{cc,hh}
fi
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