Implement the command "sics_revision" to get the SVN revision into the SICServer executable
r3734 | dcl | 2012-09-14 17:18:11 +1000 (Fri, 14 Sep 2012) | 1 line
This commit is contained in:
@@ -93,9 +93,12 @@ ifeq (,$(LIB_HTTP))
|
|||||||
$(warning LIB_HTTP not found)
|
$(warning LIB_HTTP not found)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
REVISION = $(shell svn info | grep "Revision:" | cut -d ' ' -f 2)
|
||||||
|
$(shell touch site_ansto.c)
|
||||||
|
$(info Revision text is "${REVISION}")
|
||||||
#
|
#
|
||||||
DEBUGFLAGS = -Wall -Wextra -Wno-unused -Wno-comment -Wno-switch
|
DEBUGFLAGS = -Wall -Wextra -Wno-unused -Wno-comment -Wno-switch
|
||||||
CFLAGS = -g $(INCFLAGS) $(DEBUGFLAGS) -std=gnu99
|
CFLAGS = -g $(INCFLAGS) $(DEBUGFLAGS) -std=gnu99 -DREVISION='"R${REVISION}"'
|
||||||
|
|
||||||
SRC = ./../..
|
SRC = ./../..
|
||||||
SITENAME = _ansto
|
SITENAME = _ansto
|
||||||
|
|||||||
@@ -69,6 +69,17 @@ extern void AddTCPMBProtocol ();
|
|||||||
extern void AddLFGenProtocol();
|
extern void AddLFGenProtocol();
|
||||||
extern int ANSTO_MakeHistMemory(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]);
|
extern int ANSTO_MakeHistMemory(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]);
|
||||||
|
|
||||||
|
int SICS_Revision(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[])
|
||||||
|
{
|
||||||
|
char line[132];
|
||||||
|
#ifdef REVISION
|
||||||
|
snprintf(line, 132, "SICS_Revision = %s", REVISION);
|
||||||
|
#else
|
||||||
|
snprintf(line, 132, "SICS_Revision = UNKNOWN");
|
||||||
|
#endif
|
||||||
|
SCWrite(pCon, line, eValue);
|
||||||
|
return OKOK;
|
||||||
|
};
|
||||||
|
|
||||||
void SiteInit(void) {
|
void SiteInit(void) {
|
||||||
int NetWatchInit(void);
|
int NetWatchInit(void);
|
||||||
@@ -114,6 +125,7 @@ static void AddCommands(SicsInterp *pInter)
|
|||||||
AddCommand(pInter,"MakeLSSMonitor",LSSFactory,NULL,NULL);
|
AddCommand(pInter,"MakeLSSMonitor",LSSFactory,NULL,NULL);
|
||||||
AddCommand(pInter,"MakeActionObject",ActionObjectFactory,NULL,NULL);
|
AddCommand(pInter,"MakeActionObject",ActionObjectFactory,NULL,NULL);
|
||||||
AddCommand(pInter,"ANSTO_MakeHM",ANSTO_MakeHistMemory,NULL,NULL);
|
AddCommand(pInter,"ANSTO_MakeHM",ANSTO_MakeHistMemory,NULL,NULL);
|
||||||
|
AddCommand(pInter,"SICS_Revision",SICS_Revision,NULL,NULL);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------*/
|
||||||
static void RemoveCommands(SicsInterp *pSics){
|
static void RemoveCommands(SicsInterp *pSics){
|
||||||
|
|||||||
Reference in New Issue
Block a user