2 # copies the final products of the current project into the repository.
4 # promote nothing from the built objects if this is a cleanup.
5 if [ ! -z "$CLEAN" ]; then
9 # check whether a failure should prevent promotion from occurring.
10 if [ -f $FAILURE_FILE ]; then
11 echo Postconditions will not promote due to a failure:
13 . $CLAM_DIR/exit_make.sh
16 # make sure that we actually did something during the make.
17 if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then
18 # nothing was built, seemingly, so we do no promotion.
22 # clean up generated resource files after the build.
23 for i in *.resources; do rm -f "$i"; done
25 # causes the shell to quit.
26 DIE="source $CLAM_DIR/exit_make.sh"
28 if [ ! -d $TARGETS_DIR ]; then mkdir -p $TARGETS_DIR; fi
30 if [ "$TYPE" = "library" ]; then
32 # make sure the required directories exist.
33 if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir -p $STATIC_LIBRARY_DIR; fi
34 if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir -p $DYNAMIC_LIBRARY_DIR; fi
36 elif [[ "$TYPE" == "application" || "$TYPE" == "test" ]]; then
38 # sets up the directory for executable programs and copies any found in the
39 # this project's final directory.
41 # first make sure the executable directory is around.
42 if [ ! -d $EXECUTABLE_DIR ]; then mkdir -p $EXECUTABLE_DIR; fi
44 if [ -z "$NO_COMPILE" ]; then
45 # we ensure that none of the normal products are copied for a non-compiling
48 # copy anything extra over.
49 if [ ! -z "$EXTRA_COPIES" ]; then
50 echo Copying extra files to $EXECUTABLE_DIR.
52 cp -f $EXTRA_COPIES $EXECUTABLE_DIR || $DIE
57 elif [ "$TYPE" = "hierarchy" ]; then
60 echo "Done with $PROJECT";
63 echo "Unknown type for project [$TYPE]; cancelling postconditions!"
64 source $CLAM_DIR/exit_make.sh