From 22f549f082579ab81037f05581c4fc02e72fcc6d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 6 Mar 2012 22:40:57 -0600 Subject: [PATCH] Bugfix: build headers first It is entirely possible that building the headers first is the smarter thing to do. Afterall, the source files may in fact actually use the headers they provide. --- build/scripts/generate.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build/scripts/generate.sh b/build/scripts/generate.sh index d646bf4..3289ff3 100644 --- a/build/scripts/generate.sh +++ b/build/scripts/generate.sh @@ -236,7 +236,13 @@ generate_operation_build(){ local sources= local i= - if [[ $shared == "yes" ]] ; then + if [[ $sources_headers != "" ]] ; then + for i in $sources_headers ; do + cp -vf sources/c/$i ${path_build}includes/level_$level/ || failure=1 + done + fi + + if [[ $failure == "" && $shared == "yes" ]] ; then if [[ $sources_library != "" ]] ; then for i in $sources_library ; do sources="${sources}sources/c/$i " @@ -260,7 +266,7 @@ generate_operation_build(){ echo $compiler $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]} $sources -o ${path_build}programs/$name $compiler $arguments ${variables[$(generate_id flags_shared)]} ${variables[$(generate_id flags_program)]} $sources -o ${path_build}programs/$name || failure=1 fi - else + elif [[ $failure == "" ]] ; then if [[ $sources_library != "" ]] ; then for i in $sources_library ; do sources="${sources}sources/c/$i " @@ -281,12 +287,6 @@ generate_operation_build(){ fi fi - if [[ $failure == "" && $sources_headers != "" ]] ; then - for i in $sources_headers ; do - cp -vf sources/c/$i ${path_build}includes/level_$level/ || failure=1 - done - fi - if [[ $failure != "" ]] ; then echo -e "${c_error}ERROR: failed to build.$c_reset" generate_cleanup -- 1.8.3.1