mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
some more changes to make file for automatic versioning
This commit is contained in:
@ -10,14 +10,15 @@ INSTMODE = 0777
|
||||
SRC_CLNT = communication_funcs.c slsDetectorServer.c slsDetectorServer_funcs.c slsDetectorFunctionList.c
|
||||
OBJS = $(SRC_CLNT:.c=.o)
|
||||
|
||||
all: clean $(PROGS)
|
||||
all: clean versioning $(PROGS)
|
||||
|
||||
boot: $(OBJS)
|
||||
|
||||
versioning:
|
||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||
|
||||
$(PROGS): $(OBJS)
|
||||
# echo $(OBJS)
|
||||
@echo `tput setaf 6; ./updateGitVersion.sh; tput sgr0;`
|
||||
$(CC) $(CFLAGS) -c -o slsDetectorFunctionList.o slsDetectorFunctionList.c
|
||||
mkdir -p $(DESTDIR)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||
mv $(PROGS) $(DESTDIR)
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/jungfrauDetectorServer
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git/jungfrauDetectorServer
|
||||
URL: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repository Root: origin git@git.psi.ch:sls_detectors_software/sls_detector_software.git
|
||||
Repsitory UUID: ac8afb3a4dc53ac14f7034d281acc8f0a700ca8d
|
||||
Revision: 87
|
||||
Repsitory UUID: 9f1b82c18ab0893d65bfadeb646b8ea244614632
|
||||
Revision: 88
|
||||
Branch: developer
|
||||
Last Changed Author: Dhanya_Maliakal
|
||||
Last Changed Rev: 1442
|
||||
Last Changed Date: 2017-07-03 17:44:52 +0200
|
||||
Last Changed Rev: 1443
|
||||
Last Changed Date: 2017-07-10 10:40:23.000000002 +0200 ./Makefile
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git/jungfrauDetectorServer"
|
||||
#define SVNURL "git@git.psi.ch:sls_detectors_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "ac8afb3a4dc53ac14f7034d281acc8f0a700ca8d"
|
||||
//#define SVNREV 0x1442
|
||||
#define SVNREPUUID "9f1b82c18ab0893d65bfadeb646b8ea244614632"
|
||||
//#define SVNREV 0x1443
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Dhanya_Maliakal"
|
||||
#define SVNREV 0x1442
|
||||
#define SVNDATE 0x20170703
|
||||
#define SVNREV 0x1443
|
||||
#define SVNDATE 0x20170710
|
||||
//
|
||||
|
@ -25,11 +25,11 @@ int32_t clkPhase[2] = {0, 0};
|
||||
|
||||
/* basic tests */
|
||||
|
||||
void checkFirmwareCompatibility(){
|
||||
void checkFirmwareCompatibility() {
|
||||
|
||||
defineGPIOpins();
|
||||
resetFPGA();
|
||||
if ((mapCSP0() == FAIL) || (checkType() == FAIL) || (testFpga() == FAIL) || (testBus() == FAIL) ) {
|
||||
if ((mapCSP0() == FAIL) || (checkType() == FAIL) || (testFpga() == FAIL) || (testBus() == FAIL)) {
|
||||
cprintf(BG_RED, "Dangerous to continue. Goodbye!\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
@ -1,34 +1,31 @@
|
||||
SERVER=jungfrauDetectorServer
|
||||
MAINDIR=slsDetectorsPackage
|
||||
SPECDIR=slsDetectorSoftware/$SERVER
|
||||
TMPFILE=gitInfoJungfrauTmp.h
|
||||
INCLFILE=gitInfoJungfrau.h
|
||||
|
||||
WD=slsDetectorSoftware/$SERVER
|
||||
|
||||
GITREPO1='git remote -v'
|
||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
||||
BRANCH1='git branch -v'
|
||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
||||
REPUID1='git log --pretty=format:"%H" -1'
|
||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
||||
AUTH1_2=" | cut -d' ' -f1"
|
||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
||||
AUTH2_2=" | cut -d' ' -f2"
|
||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
||||
REV1='git log --oneline '
|
||||
REV2=" | wc -l"
|
||||
RDATE1='git log --pretty=format:"%ci" -1'
|
||||
#evaluate the variables
|
||||
EVALFILE=../../evalVersionVariables.sh
|
||||
source $EVALFILE
|
||||
|
||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
||||
REPUID=`eval $REPUID1`
|
||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
||||
REV=`eval $REV1 $REV2`
|
||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
||||
|
||||
#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`
|
||||
echo Path: slsDetectorsPackage/$WD $'\n'URL: ${GITREPO}/$SERVER $'\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 $WD/gitInfo.txt $WD/$TMPFILE $WD/$INCLFILE
|
||||
echo "Revision Updated"
|
||||
cd $WD
|
||||
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
|
Reference in New Issue
Block a user