Anna's modifications

This commit is contained in:
2017-08-11 15:55:07 +02:00
67 changed files with 1879 additions and 763 deletions

View File

@@ -22,12 +22,15 @@ OBJS = $(SRCS:%.c=%.o)
all: clean $(PROGS)
all: clean versioning $(PROGS)
test: clean jungfrauADCTEst
boot: $(OBJS)
versioning:
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
jungfrauDetectorServerTest: $(OBJS)
echo $(OBJS)
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS_$@) $(LDFLAGS_$@)

View File

@@ -0,0 +1,31 @@
SERVER=jctbDetectorServer
MAINDIR=slsDetectorsPackage
SPECDIR=slsDetectorSoftware/$SERVER
TMPFILE=gitInfoMoenchTmp.h
INCLFILE=gitInfoMoench.h
#evaluate the variables
EVALFILE=../../evalVersionVariables.sh
source $EVALFILE
#get modified date
#RDATE1='git log --pretty=format:"%ci" -1'
RDATE1="find . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|.git|updateGitVersion|.o' | head -n 1"
RDATE=`eval $RDATE1`
NEWDATE=$(sed "s/-//g" <<< $RDATE | awk '{print $1;}')
NEWDATE=${NEWDATE/#/0x}
#get old date from INCLFILE
OLDDATE=$(more $INCLFILE | grep '#define SVNDATE' | awk '{print $3}')
#update INCLFILE if changes
if [ "$OLDDATE" != "$NEWDATE" ]; then
echo Path: ${MAINDIR}/${SPECDIR} $'\n'URL: ${GITREPO} $'\n'Repository Root: ${GITREPO} $'\n'Repsitory UUID: ${REPUID} $'\n'Revision: ${FOLDERREV} $'\n'Branch: ${BRANCH} $'\n'Last Changed Author: ${AUTH1}_${AUTH2} $'\n'Last Changed Rev: ${REV} $'\n'Last Changed Date: ${RDATE} > gitInfo.txt
cd ../../
./genVersionHeader.sh $SPECDIR/gitInfo.txt $SPECDIR/$TMPFILE $SPECDIR/$INCLFILE
cd $WD
fi