Skip to content

Commit d08ffa5

Browse files
committed
update build_all.sh, fix schema dir name in data/CMakeLists.txt
1 parent 89055ea commit d08ffa5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

data/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ FUNCTION(BUILD_A_SCHEMA SCHEMA_FILE)
6969
file(STRINGS ${SCHEMA_FILE} SCHEMA_STATEMENT LIMIT_COUNT 1 REGEX "^SCHEMA .*")
7070
string(REGEX REPLACE "^SCHEMA \(.*\)\;$" "\\1" SCHEMA_N ${SCHEMA_STATEMENT} )
7171
string(TOUPPER ${SCHEMA_N} SCHEMA_LONG_NAME) #fedex_plus always uses upper case for file names
72-
get_filename_component(SCHEMA_SHORT_NAME ${SCHEMA_FILE} NAME_WE)
72+
get_filename_component( SCHEMA_SN ${SCHEMA_FILE} NAME )
73+
string( REGEX REPLACE "\(.*\).[Ee][Xx][Pp]" "\\1" SCHEMA_SHORT_NAME ${SCHEMA_SN} )
7374

7475
project( sdai_${SCHEMA_SHORT_NAME} )
7576
message( STATUS "Generating code for ${SCHEMA_SHORT_NAME}.")

misc/wiki-scripts/build_all.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ result_dir="."
99
mk="make -j4"
1010

1111
#separated by ; for cmake
12-
schemas="../data/ap203/203wseds.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap210e3/ap210e3_wip1.41_mim_lf.exp;../data/ap214e3/AP214E3_2010.exp;../data/ap227/ap227.exp;../data/ap235/AP235-aim-long.exp;../data/ap240/AP240_aim_lf.exp;../data/cd209/part409cdts_wg3n2617mim_lf.exp;../data/cd242/242_n2813_mim_lf.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/ifc2x4/IFC2X4_RC2.exp;../data/ISO15926/15926-0002-lifecycle_integration.exp"
12+
schemas="../data/203wseds/203wseds.exp;../data/ap203e2/ap203e2_mim_lf.exp;../data/ap210e3/ap210e3_wip1.41_mim_lf.exp;../data/ap214e3/AP214E3_2010.exp;../data/ap227/ap227.exp;../data/ap235/AP235_TC_engineering_properties_schema_20110222.exp;../data/ap240/AP240_aim_lf.exp;../data/cd209/part409cdts_wg3n2617mim_lf.exp;../data/cd242/242_n2813_mim_lf.exp;../data/ifc2x3/IFC2X3_TC1.exp;../data/ifc2x4/IFC2X4_RC3.exp;../data/ISO15926/15926-0002-lifecycle_integration.exp"
1313
#count warnings and errors, append to $matrix_file. creates hypertext links to stderr,stdout txt
1414
# $1 is the name of the row, $2 is the path and first part of the filename, $3 is the schema
1515
function count_we {
@@ -78,11 +78,12 @@ function fedex_details {
7878
function build_one_schema {
7979
#set $i to the schema name, all caps (to match fedex_plus output)
8080
i=`sed -ne '0,/^\s*SCHEMA/s/^.*SCHEMA\s\+\(.*\);.*$/\1/p;' $1|tr a-z A-Z`
81+
d=`echo $1|sed -e 's|^.*/\([^/]*\)\.exp$|\1|;'`
8182

8283
echo "Running fedex_plus and gcc for $i..."
83-
make -f data/CMakeFiles/sdai_$i.dir/build.make $i/compstructs.cc 2>"$result_dir/fedex_"$i"_stderr.txt" >"$result_dir/fedex_"$i"_stdout.txt" && \
84-
$mk sdai_$i >/dev/null 2>"$result_dir/compile_libsdai_"$i"_stderr.txt" && \
85-
$mk p21read_sdai_$i >/dev/null 2>"$result_dir/compile_p21read_sdai_"$i"_stderr.txt"
84+
make generate_$d 2>"$result_dir/fedex_"$i"_stderr.txt" >"$result_dir/fedex_"$i"_stdout.txt" && \
85+
$mk sdai_$d >/dev/null 2>"$result_dir/compile_libsdai_"$i"_stderr.txt" && \
86+
$mk p21read_sdai_$d >/dev/null 2>"$result_dir/compile_p21read_sdai_"$i"_stderr.txt"
8687

8788
#todo: test p21read_sdai_$i
8889
}

0 commit comments

Comments
 (0)