2 # prepares the project for compilation by creating the appropriate directories.
4 # make sure our temp directory is there.
5 if [ ! -d $CLAM_TMP ]; then mkdir -p $CLAM_TMP; fi
7 # if the clean flag is defined, then we need to quit. we should not be
8 # creating directories or doing other tasks for a build that is really
10 if [ ! -z "$CLEAN" ]; then
14 # make sure generated files have a home.
15 if [ ! -d $TARGETS_STORE ]; then mkdir -p $TARGETS_STORE; fi
16 # create the generated files storage area.
17 if [ ! -d $OUTPUT_ROOT ]; then mkdir -p $OUTPUT_ROOT; fi
18 # create the top level object directory if it doesn't exist.
19 if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir -p $BASE_OUTPUT_PATH; fi
20 # create the project level object directory if it is non-existent.
21 if [ ! -d $OUTPUT_PATH ]; then mkdir -p $OUTPUT_PATH; fi
22 # create a directory to hold any debugging files, if necessary.
23 if [ ! -d $PDB_DIR ]; then mkdir -p $PDB_DIR; fi
25 ####if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi
27 if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi
29 if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi
31 if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi
33 # set versions on any extras that were specified in the makefile.
34 if [ ! -z "$EXTRA_VERSIONS" ]; then
35 for i in $EXTRA_VERSIONS; do
36 $CLAM_BINARIES/version_stamper$EXE_ENDING $i $PARAMETER_FILE
40 # we whack any zero length objects found, since those are generally artifacts
41 # of an aborted compilation.
42 $FIND "$OBJECT_DIR" -type f -size 0 -exec rm -f {} ';'
44 # we also clean out the specific targets that we intend to build. we don't
45 # want phony old versions sitting around confusing us.
46 if [ ! -z "$NO_COMPILE" ]; then
47 # echo "we're removing these now: $ACTUAL_TARGETS"
51 if [ ! -z "$TEST_MAKEFILE" ]; then
53 # this will only work if the LOCAL_LIBS_USED and SOURCE are exported
55 #??, STATIC_LIBRARY_DIR
57 #echo "compiler=$CLAM_COMPILER"
58 #echo "OPERATING_SYSTEM=$OPERATING_SYSTEM"
60 #echo "checking for all local libs: $LOCAL_LIBS_USED"
62 for i in $LOCAL_LIBS_USED; do
63 #echo curr lib is $STATIC_LIBRARY_DIR/$i$LIB_ENDING
64 if [ ! -f "$STATIC_LIBRARY_DIR/$i$LIB_ENDING" ]; then
65 echo "Missing a local library: $i$LIB_ENDING"
69 if [ "$failed_check" != "" ]; then
73 #echo "checking for all source files: $SOURCE"
76 #echo curr src file is $i
77 if [ ! -f "$i" ]; then
78 echo "Missing a source file: $i"
82 if [ "$failed_check" != "" ]; then