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

@ -21,11 +21,15 @@ CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DDACS_INT $(VFLAGS)
LDLIBS+= -lm
mythen: clean $(PROGS)
all: $(PROGS)
mythen: clean versioning $(PROGS)
all: versioning $(PROGS)
boot: $(OBJS)
versioning:
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
$(PROGS): $(OBJS)
echo $(OBJS)
$(CC) $(LDFLAGS) $^ $(LDLIBS) $(CFLAGS) -o $@
@ -39,3 +43,4 @@ clean:
depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null

View File

@ -18,7 +18,7 @@ CFLAGS+= -Wall -DC_ONLY -DVERBOSE
LDLIBS+= -lm
all: $(PROGS)
all: versioning $(PROGS)
boot: $(OBJS)
@ -35,3 +35,6 @@ clean:
depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
versioning:
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`

View File

@ -21,8 +21,8 @@ CFLAGS+= -Wall -DC_ONLY -DMCB_FUNCS -DVERBOSE -DVERYVERBOSE -DPICASSOD
LDLIBS+= -lm
picasso: $(PICASSO)
mythen: $(PROGS)
all: $(PROGS) $(PICASSO)
mythen: versioning $(PROGS)
all: versioning $(PROGS) $(PICASSO)
boot: $(OBJS)
@ -44,3 +44,6 @@ clean:
depend:
makedepend -Y -- $(CFLAGS) -- $(SRCS) 2>/dev/null
versioning:
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`

View File

@ -0,0 +1,31 @@
SERVER=mythenDetectorServer
MAINDIR=slsDetectorsPackage
SPECDIR=slsDetectorSoftware/$SERVER
TMPFILE=gitInfoMythenTmp.h
INCLFILE=gitInfoMythen.h
#evaluate the variables
EVALFILE=../../evalVersionVariables.sh
source $EVALFILE
#get modified date
#RDATE1='git log --pretty=format:"%ci" -1'
RDATE1="find ../slsDetectorServer . -type f -exec stat --format '%Y :%y %n' '{}' \; | sort -nr | cut -d: -f2- | egrep -v 'gitInfo|bin|.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