Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xxx-R6-1
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
synApps_6_1_Working
xxx-R6-1
Commits
2b0d134d
Commit
2b0d134d
authored
23 years ago
by
mooney
Browse files
Options
Downloads
Patches
Plain Diff
Modified makeIocCdCommands.pl to support "include" directives
and the EPICS_SUPPORT_PATH environment variable.
parent
288a7843
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
config/makeIocCdCommands.pl
+65
-31
65 additions, 31 deletions
config/makeIocCdCommands.pl
with
65 additions
and
31 deletions
config/makeIocCdCommands.pl
+
65
−
31
View file @
2b0d134d
...
...
@@ -2,6 +2,14 @@ eval 'exec perl -S $0 ${1+"$@"}' # -*- Mode: perl -*-
if
$running_under_some_shell
;
# makeIocCdCommands.pl
use
Cwd
;
use
Env
;
$post
=
$ENV
{"
EPICS_SUPPORT_PATH
"};
if
(
$post
ne
"")
{
$prefix
=
"
EPICS_SUPPORT_PATH
";
$applications
{
$prefix
}
=
$post
;
}
$cwd
=
cwd
();
#hack for sun4
...
...
@@ -24,37 +32,63 @@ print OUT "top = \"$top\"\n";
$topbin
=
"
${top}
/bin/
${arch}
";
#skip check that top/bin/${arch} exists; src may not have been builT
print
OUT
"
topbin =
\"
$topbin
\"\n
";
$release
=
"
$top
/config/RELEASE
";
if
(
-
r
"
$release
")
{
open
(
IN
,
"
$release
")
or
die
"
Cannot open
$release
\n
";
while
(
$line
=
<
IN
>
)
{
next
if
(
$line
=~
/\s*#/
);
chomp
(
$line
);
$_
=
$line
;
#the following looks for
# prefix = $(macro)post
(
$prefix
,
$macro
,
$post
)
=
/(.*)\s*=\s*\$\((.*)\)(.*)/
;
if
(
$macro
eq
"")
{
# true if no macro is present
# the following looks for
# prefix = post
(
$prefix
,
$post
)
=
/(.*)\s*=\s*(.*)/
;
}
else
{
$base
=
$applications
{
$macro
};
if
(
$base
eq
"")
{
print
"
error:
$macro
was not previously defined
\n
";
}
else
{
$post
=
$base
.
$post
;
}
}
$applications
{
$prefix
}
=
$post
;
$app
=
lc
(
$prefix
);
if
(
-
d
"
$post
")
{
#check that directory exists
print
OUT
"
$app
=
\"
$post
\"\n
";
}
if
(
-
d
"
$post
/bin/
$arch
")
{
#check that directory exists
print
OUT
"
${app}
bin =
\"
$post
/bin/
$arch
\"\n
";
}
@files
=
();
push
(
@files
,"
$top
/config/RELEASE
");
foreach
$file
(
@files
)
{
if
(
-
r
"
$file
")
{
open
(
IN
,
"
$file
")
or
die
"
Cannot open
$file
\n
";
while
(
$line
=
<
IN
>
)
{
next
if
(
$line
=~
/\s*#/
);
chomp
(
$line
);
$_
=
$line
;
(
$prefix
,
$macro
,
$post
)
=
/(.*)\s* \s*\$\((.*)\)(.*)/
;
#test for "include" command
if
(
$prefix
eq
"
include
")
{
if
(
$macro
eq
"")
{
# true if no macro is present
#the following looks for
#prefix = post
(
$prefix
,
$post
)
=
/(.*)\s* \s*(.*)/
;
}
else
{
$base
=
$applications
{
$macro
};
if
(
$base
eq
"")
{
#print "error: $macro was not previously defined\n";
}
else
{
$post
=
$base
.
$post
;
}
}
push
(
@files
,"
$post
")
}
else
{
#the following looks for
# prefix = $(macro)post
(
$prefix
,
$macro
,
$post
)
=
/(.*)\s*=\s*\$\((.*)\)(.*)/
;
if
(
$macro
eq
"")
{
# true if no macro is present
# the following looks for
# prefix = post
(
$prefix
,
$post
)
=
/(.*)\s*=\s*(.*)/
;
}
else
{
$base
=
$applications
{
$macro
};
if
(
$base
eq
"")
{
print
"
error:
$macro
was not previously defined
\n
";
}
else
{
$post
=
$base
.
$post
;
}
}
$applications
{
$prefix
}
=
$post
;
$app
=
lc
(
$prefix
);
if
(
-
d
"
$post
")
{
#check that directory exists
print
OUT
"
$app
=
\"
$post
\"\n
";
}
if
(
-
d
"
$post
/bin/
$arch
")
{
#check that directory exists
print
OUT
"
${app}
bin =
\"
$post
/bin/
$arch
\"\n
";
}
}
}
close
IN
;
}
close
IN
;
}
close
OUT
;
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