Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
c86a191b
Commit
c86a191b
authored
Aug 15, 2014
by
Thomas Jahns
🤸
Browse files
Change table.h generator to work in VPATH builds.
parent
aa6c43c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tables/gen_tableheaderfile.in
View file @
c86a191b
...
...
@@ -3,8 +3,8 @@
# gen_tables create the headerfile table.h
# with all default tables from default_tables
#
DEFTABLES
=
default_tables
OFILE
=
table.h
DEFTABLES
=
@abs_top_srcdir@/tables/
default_tables
OFILE
=
@abs_top_srcdir@/src/
table.h
PTFILES
=
""
#
#########################################
...
...
@@ -18,6 +18,7 @@ while true ; do
read
-u3
PTFILE[item]
if
[
-z
${
PTFILE
[item]
}
]
;
then
break
;
fi
#
PTFILE[item]
=
"@abs_srcdir@/
${
PTFILE
[item]
}
"
PTFILES
=
"
${
PTFILES
}
${
PTFILE
[item]
}
"
#
item
=
`
expr
$item
+ 1
`
...
...
@@ -39,7 +40,7 @@ EOF
for
TFILE
in
$PTFILES
;
do
echo
"process:
$TFILE
"
rm
-f
ptfile
../
../cdi/
app/createtable
$TFILE
ptfile
../app/createtable
$TFILE
ptfile
cat
ptfile
>>
$OFILE
done
#
...
...
@@ -60,6 +61,7 @@ settabvar() {
item
=
0
while
[
$item
-lt
$NTABLES
]
;
do
TFILE
=
${
PTFILE
[item]
}
TFBASENAME
=
"
${
TFILE
##*/
}
"
echo
"process:
$TFILE
"
#
TABLE_ID
=
`
settabvar
${
TFILE
}
"TABLE_ID"
`
...
...
@@ -70,18 +72,18 @@ TABLE_CE=`settabvar ${TFILE} "TABLE_CE"`
TABLE_SU
=
`
settabvar
${
TFILE
}
"TABLE_SU"
`
#
if
[
-z
$TABLE_ID
]
;
then
TABLE_ID
=
0
;
fi
if
[
-z
$TABLE_NA
]
;
then
TABLE_NA
=
$TF
IL
E
;
fi
if
[
-z
$TABLE_NA
]
;
then
TABLE_NA
=
$TF
BASENAM
E
;
fi
#if [ -z $TABLE_MO ] ; then TABLE_MO=NULL; fi
if
[
-z
$TABLE_CE
]
;
then
TABLE_CE
=
0
;
fi
if
[
-z
$TABLE_SU
]
;
then
TABLE_SU
=
0
;
fi
#
echo
"ID =
$TABLE_ID
name=
$TABLE_NA
model=
$TABLE_MO
inistitut=
$TABLE_IN
center=
$TABLE_CE
subcenter=
$TABLE_SU
"
TABLENAME
=
`
echo
${
TF
IL
E
}
|
sed
-e
"s/
\.
/_/g"
`
TABLENAME
=
`
echo
${
TF
BASENAM
E
}
|
sed
-e
"s/
\.
/_/g"
`
#
cat
>>
$OFILE
<<
EOF
/*
* define table :
${
TF
IL
E
}
* define table :
${
TF
BASENAM
E
}
*/
instID = institutInq(
${
TABLE_CE
}
,
${
TABLE_SU
}
, "
${
TABLE_IN
}
", NULL);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment