Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anders Lindh Olsson
e3-require
Commits
e51dd7cd
Commit
e51dd7cd
authored
8 years ago
by
Dirk Zimoch
Browse files
Options
Downloads
Patches
Plain Diff
allow EPICS version in script name
parent
162cb2e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
require.c
+26
-11
26 additions, 11 deletions
require.c
with
26 additions
and
11 deletions
require.c
+
26
−
11
View file @
e51dd7cd
...
...
@@ -234,8 +234,8 @@ int requireDebug;
#define TOSTR(s) TOSTR2(s)
#define TOSTR2(s) #s
#define EPICS_RELEASE
TOSTR(EPICS_VERSION)"."TOSTR(EPICS_REVISION)"."TOSTR(EPICS_MODIFICATION)
const
char
epics
Release
[]
=
EPICS_RELEASE
;
const
char
epicsRelease
[]
=
TOSTR
(
EPICS_VERSION
)
"."
TOSTR
(
EPICS_REVISION
)
"."
TOSTR
(
EPICS_MODIFICATION
)
;
const
char
epics
Basetype
[]
=
TOSTR
(
EPICS_VERSION
)
"."
TOSTR
(
EPICS_REVISION
)
;
#ifndef T_A
#error T_A not defined: Compile with USR_CFLAGS += -DT_A=${T_A}
...
...
@@ -545,12 +545,12 @@ void registerModule(const char* module, const char* version, const char* locatio
char
*
argstring
=
NULL
;
int
addSlash
=
0
;
const
char
*
mylocation
;
static
int
first
Run
=
1
;
static
int
first
Time
=
1
;
if
(
requireDebug
)
printf
(
"require: registerModule(%s,%s,%s)
\n
"
,
module
,
version
,
location
);
if
(
first
Run
)
if
(
first
Time
)
{
#ifdef EPICS_3_13
int
(
*
initHookRegister
)()
=
NULL
;
...
...
@@ -559,11 +559,11 @@ void registerModule(const char* module, const char* version, const char* locatio
if
(
initHookRegister
)
#endif
{
firstRun
=
0
;
initHookRegister
(
fillModuleListRecord
);
if
(
requireDebug
)
printf
(
"require: initHookRegister
\n
"
);
}
firstTime
=
0
;
}
if
(
!
version
)
version
=
""
;
...
...
@@ -995,12 +995,15 @@ int require(const char* module, const char* version, const char* args)
{
int
status
;
char
*
versionstr
;
static
int
firstTime
=
1
;
if
(
getenv
(
"T_A"
)
==
NULL
)
if
(
firstTime
)
{
firstTime
=
0
;
putenvprintf
(
"T_A=%s"
,
targetArch
);
if
(
getenv
(
"EPICS_RELEASE"
)
==
NULL
)
putenvprintf
(
"EPICS_HOST_ARCH=%s"
,
targetArch
);
putenvprintf
(
"EPICS_RELEASE=%s"
,
epicsRelease
);
}
if
(
module
==
NULL
)
{
...
...
@@ -1582,11 +1585,23 @@ loadlib:
if
(
requireDebug
)
printf
(
"require: looking for startup script
\n
"
);
/* filename = "<dirname>/[dirlen]<module>/<version>/R<epicsRelease>/[releasediroffs]db" */
if
(
TRY_FILE
(
releasediroffs
,
"%s.cmd"
,
targetArch
)
||
TRY_FILE
(
releasediroffs
,
"%s.cmd"
,
osClass
)
||
TRY_FILE
(
releasediroffs
,
"startup.cmd"
)
||
if
(
TRY_FILE
(
releasediroffs
,
"%s-%s.cmd"
,
targetArch
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s-%s.cmd"
,
targetArch
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
"%s-%s.cmd"
,
targetArch
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s-%s.cmd"
,
targetArch
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
"%s-%s.cmd"
,
osClass
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s-%s.cmd"
,
osClass
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
"%s-%s.cmd"
,
osClass
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s-%s.cmd"
,
osClass
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
"startup-%s.cmd"
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"startup-%s.cmd"
,
epicsRelease
)
||
TRY_FILE
(
releasediroffs
,
"startup-%s.cmd"
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"startup-%s.cmd"
,
epicsBasetype
)
||
TRY_FILE
(
releasediroffs
,
"%s.cmd"
,
targetArch
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s.cmd"
,
targetArch
)
||
TRY_FILE
(
releasediroffs
,
"%s.cmd"
,
osClass
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"%s.cmd"
,
osClass
)
||
TRY_FILE
(
releasediroffs
,
"startup.cmd"
)
||
TRY_FILE
(
releasediroffs
,
".."
OSI_PATH_SEPARATOR
"startup.cmd"
)
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment