Reorganized iocsh command registration to untangle the build order.
The iocsh core is now part of libCom, and commands are registered locally with a Register routine for each IOC library.
This commit is contained in:
@@ -11,16 +11,15 @@ TOP=../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
#YACCOPT := -l
|
||||
#LEXOPT := -L
|
||||
|
||||
INC += dbLoadTemplate.h
|
||||
INC += dbtoolsIocRegister.h
|
||||
|
||||
LIBSRCS += dbLoadTemplate.c
|
||||
LIB_SRCS += dbLoadTemplate.c
|
||||
LIB_SRCS += dbtoolsIocRegister.c
|
||||
|
||||
LIBRARY_IOC = dbtoolsIoc
|
||||
|
||||
dbtoolsIoc_LIBS = dbIoc Com
|
||||
dbtoolsIoc_LIBS = dbIoc dbStaticIoc Com
|
||||
|
||||
dbtoolsIoc_RCS_WIN32 = dbtoolsIoc.rc
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#include "iocsh.h"
|
||||
|
||||
#define epicsExportSharedSymbols
|
||||
#include "dbtoolsIocRegister.h"
|
||||
#include "dbLoadTemplate.h"
|
||||
|
||||
|
||||
/* dbLoadTemplate */
|
||||
static const iocshArg dbLoadTemplateArg0 = { "file name",iocshArgString};
|
||||
static const iocshArg * const dbLoadTemplateArgs[1] = {&dbLoadTemplateArg0};
|
||||
static const iocshFuncDef dbLoadTemplateFuncDef =
|
||||
{"dbLoadTemplate",1,dbLoadTemplateArgs};
|
||||
static void dbLoadTemplateCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
dbLoadTemplate(args[0].sval);
|
||||
}
|
||||
|
||||
|
||||
void epicsShareAPI dbtoolsIocRegister(void)
|
||||
{
|
||||
iocshRegister(&dbLoadTemplateFuncDef,dbLoadTemplateCallFunc);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
#ifndef INC_dbtoolsIocRegister_H
|
||||
#define INC_dbtoolsIocRegister_H
|
||||
|
||||
#include "shareLib.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
epicsShareFunc void epicsShareAPI dbtoolsIocRegister(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* INC_dbtoolsIocRegister_H */
|
||||
Reference in New Issue
Block a user