From: Chris Koeritz Date: Tue, 1 Dec 2015 04:23:30 +0000 (-0500) Subject: a ton of changes to fix the production directory. formerly this directory $FEISTY_ME... X-Git-Tag: 2.140.90~564 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=102061cab065f647954f3e935f11f433e2f088d4 a ton of changes to fix the production directory. formerly this directory $FEISTY_MEOW_DIR/production was a mix of source code, library files and generated objects, logs, and executables. yuck. now the production folder is just source and libraries. there is now a new runtime directory for all the generated content, like the apps produced during the build. this directory is located under $TMP in order to avoid polluting the same directory tree that feisty meow lives in. this will also support system-wide installs better. --- diff --git a/building.txt b/building.txt index 01ce2687..bd2be9e9 100644 --- a/building.txt +++ b/building.txt @@ -21,7 +21,7 @@ Quick Start for the Feisty Meow Codebase: bash ~/feisty_meow/scripts/generator/bootstrap_build.sh - All the applications can be found in ~/feisty_meow/production/binaries + All the applications can be found in $BINDIR after the build is complete. Cleaning the Codebase: diff --git a/doc/clam_manual/clam_docs.html b/doc/clam_manual/clam_docs.html index 75605a6e..8e862d22 100644 --- a/doc/clam_manual/clam_docs.html +++ b/doc/clam_manual/clam_docs.html @@ -988,10 +988,9 @@ but this will trap errors it sees and play the build error CLAM_ERROR_SOUND.
-

CLAM_BIN

+

CLAM_BINARY_DIR

     This is a folder where the helper - binaries for  are located. The default for this is usually - CLAM_DIR/../bin.
+ binaries for the CLAM makefile system are located.

CLAM_DIR

     This variable points at the location diff --git a/doc/feisty_meow_dox.config b/doc/feisty_meow_dox.config index 53da9b58..a907a656 100644 --- a/doc/feisty_meow_dox.config +++ b/doc/feisty_meow_dox.config @@ -627,7 +627,7 @@ GENERATE_HTML = YES # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = $(PRODUCTION_DIR)/code_guide +HTML_OUTPUT = $(RUNTIME_DIR)/code_guide # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank diff --git a/nucleus/applications/bundler/bundle_creator.cpp b/nucleus/applications/bundler/bundle_creator.cpp index 7bb04947..533a45e2 100644 --- a/nucleus/applications/bundler/bundle_creator.cpp +++ b/nucleus/applications/bundler/bundle_creator.cpp @@ -748,7 +748,7 @@ astring bundle_creator::determine_stub_file_and_validate() #ifdef __WIN32__ astring stub_filename("unpacker_stub.exe"); #endif - astring repo_dir = "$PRODUCTION_DIR"; + astring repo_dir = "$RUNTIME_DIR"; astring stub_file = parser_bits::substitute_env_vars (repo_dir + "/binaries/" + stub_filename, false); if (!filename(stub_file).exists()) { diff --git a/nucleus/applications/utilities/time_running_app.cpp b/nucleus/applications/utilities/time_running_app.cpp index 5bbf5d13..19bdbafa 100644 --- a/nucleus/applications/utilities/time_running_app.cpp +++ b/nucleus/applications/utilities/time_running_app.cpp @@ -57,7 +57,7 @@ int time_running_app::execute() int test_runs = 10000; time_stamp start; // start of test. - astring bins = environment::get("FEISTY_MEOW_DIR") + "/production/binaries"; + astring bins = environment::get("$BINDIR"); astring app = bins + "/example_application"; // save real stdout. int real_stdout = dup(1); diff --git a/nucleus/makefile b/nucleus/makefile index 8fe1d439..d3899972 100644 --- a/nucleus/makefile +++ b/nucleus/makefile @@ -7,9 +7,9 @@ include variables.def ifeq "$(FEISTY_MEOW_DIR)" "" export FEISTY_MEOW_DIR := $(CURRENT_DIR) endif -ifeq "$(PRODUCTION_DIR)" "" - export PRODUCTION_DIR = $(FEISTY_MEOW_DIR)/production -endif +#ifeq "$(PRODUCTION_DIR)" "" +# export PRODUCTION_DIR = $(FEISTY_MEOW_DIR)/production +#endif ifeq "$(CLAM_DIR)" "" export CLAM_DIR = $(FEISTY_MEOW_SCRIPTS)/clam endif @@ -23,13 +23,13 @@ BUILD_AFTER = library applications tools include $(CLAM_DIR)/cpp/rules.def -do_make: start_make $(PRODUCTION_DIR)/binaries/manifest.txt end_make +do_make: start_make $(RUNTIME_DIR)/binaries/manifest.txt end_make start_make: show_date.start end_make: show_date.end -$(PRODUCTION_DIR)/binaries/manifest.txt: $(PARAMETER_FILE) +$(RUNTIME_DIR)/binaries/manifest.txt: $(PARAMETER_FILE) $(HIDESH) -c '\ if [ ! -d "$(EXECUTABLE_DIR)" ]; then mkdir -p "$(EXECUTABLE_DIR)"; fi; \ if [ $$? -ne 0 ]; then \ @@ -41,12 +41,12 @@ if [ $$? -ne 0 ]; then \ echo build failure while copying paths initialization file.; \ exit 1; \ fi; \ -bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \ +bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BINARY_DIR)/value_tagger$(EXE_END) $(PRODUCTION_DIR)/codescan.ini; \ if [ $$? -ne 0 ]; then \ echo build failure during value tagging.; \ exit 1; \ fi; \ -bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BIN)/write_build_config$(EXE_END); \ +bash $(BUILD_SCRIPTS_DIR)/wrapdoze.sh $(CLAM_BINARY_DIR)/write_build_config$(EXE_END); \ if [ $$? -ne 0 ]; then \ echo build failure while writing config.; \ exit 1; \ diff --git a/production/assign_bases/whack_odd_dlls.sh b/production/assign_bases/whack_odd_dlls.sh index b30d7cb5..d9f23ddd 100644 --- a/production/assign_bases/whack_odd_dlls.sh +++ b/production/assign_bases/whack_odd_dlls.sh @@ -1,6 +1,6 @@ #!/bin/bash -DA_DIR="$PRODUCTION_DIR/binaries" +DA_DIR="$RUNTIME_DIR/binaries" rm -f $DA_DIR/AxInterop.*.dll \ $DA_DIR/DevAge*dll \ diff --git a/production/codescan.ini b/production/codescan.ini index e663cd1e..99a8b9bb 100644 --- a/production/codescan.ini +++ b/production/codescan.ini @@ -1,5 +1,5 @@ [manifest] -output=$BUILD_TOP/production/binaries/manifest.txt +output=$BINDIR/manifest.txt [searches] DEFINE_OUTCOME=1 diff --git a/production/setup_src/bundle_example/create_bundle.sh b/production/setup_src/bundle_example/create_bundle.sh index 5fd83564..4a3d4c45 100644 --- a/production/setup_src/bundle_example/create_bundle.sh +++ b/production/setup_src/bundle_example/create_bundle.sh @@ -1,10 +1,10 @@ #!/bin/bash -if [ ! -d $PRODUCTION_DIR/install ]; then mkdir $PRODUCTION_DIR/install; fi +if [ ! -d $RUNTIME_DIR/install ]; then mkdir $RUNTIME_DIR/install; fi echo exe ending is $EXE_END -rm -f $PRODUCTION_DIR/install/example_bundle$EXE_END +rm -f $RUNTIME_DIR/install/example_bundle$EXE_END -$EXECUTABLE_DIR/bundle_creator -o $PRODUCTION_DIR/install/example_bundle$EXE_END -m ./example_manifest.txt +$EXECUTABLE_DIR/bundle_creator -o $RUNTIME_DIR/install/example_bundle$EXE_END -m ./example_manifest.txt diff --git a/production/setup_src/bundle_example/example_manifest.txt b/production/setup_src/bundle_example/example_manifest.txt index d2c3577a..58f96a7d 100644 --- a/production/setup_src/bundle_example/example_manifest.txt +++ b/production/setup_src/bundle_example/example_manifest.txt @@ -114,7 +114,7 @@ target=$TARGET/bytedunker$EXE_END ; operating systems and is blank for others (so far). [using_vars] -source=$CLAM_BIN/value_tagger$EXE_END +source=$CLAM_BINARY_DIR/value_tagger$EXE_END target=$TMP/using_varsilator$EXE_END ; variables in the source get resolved at packing time. ; variables in the target get resolved during unbundling time. diff --git a/production/setup_src/whole_build_package/create_whole_build_pack.sh b/production/setup_src/whole_build_package/create_whole_build_pack.sh index f0413fac..3c8c68fa 100644 --- a/production/setup_src/whole_build_package/create_whole_build_pack.sh +++ b/production/setup_src/whole_build_package/create_whole_build_pack.sh @@ -4,7 +4,7 @@ version=$1 -INSTDIR=$PRODUCTION_DIR/install +INSTDIR=$RUNTIME_DIR/install if [ ! -d "$INSTDIR" ]; then mkdir "$INSTDIR"; fi # the new packages are named after the build version. @@ -15,9 +15,9 @@ rm -f $INSTDIR/whole_build_*exe $INSTDIR/sources_*exe echo echo Creating source package in `basename $source_pack` -$PRODUCTION_DIR/binaries/bundle_creator -o $source_pack -m ./whole_build_manifest.txt --keyword sources +$RUNTIME_DIR/binaries/bundle_creator -o $source_pack -m ./whole_build_manifest.txt --keyword sources echo echo Creating full build package in `basename $total_build` -$PRODUCTION_DIR/binaries/bundle_creator -o $total_build -m ./whole_build_manifest.txt +$RUNTIME_DIR/binaries/bundle_creator -o $total_build -m ./whole_build_manifest.txt diff --git a/production/setup_src/whole_build_package/makefile b/production/setup_src/whole_build_package/makefile index 86bcc450..b49a0de5 100644 --- a/production/setup_src/whole_build_package/makefile +++ b/production/setup_src/whole_build_package/makefile @@ -2,7 +2,7 @@ include cpp/variables.def PROJECT = Whole_Build_Pack FIRST_TARGETS = create_package -CLEANUPS = $(PRODUCTION_DIR)/install/whole_build* +CLEANUPS = $(RUNTIME_DIR)/install/whole_build* TYPE = hierarchy export TARGET=/tmp/zz_wholebuild_$(USER) @@ -10,7 +10,7 @@ include cpp/rules.def create_package: ifeq "$(NO_BUILD_PACK)" "" - $(HIDE)-mkdir -p $(TARGET)/waste +#will it fail? $(HIDE)-mkdir -p $(TARGET)/waste $(HIDESH)create_whole_build_pack.sh "$(major).$(minor).$(revision).$(build)" endif diff --git a/production/setup_src/whole_build_package/whole_build_manifest.txt b/production/setup_src/whole_build_package/whole_build_manifest.txt index ca8a22e0..0b4b9847 100644 --- a/production/setup_src/whole_build_package/whole_build_manifest.txt +++ b/production/setup_src/whole_build_package/whole_build_manifest.txt @@ -35,10 +35,10 @@ win32_helper=t ; variables used during installation. [set_temp] -variable=TEMP=$TARGET/waste +variable=TEMP=$TARGET/waste-buildpack keyword=sources [set_tmp] -variable=TMP=$TARGET/waste +variable=TMP=$TARGET/waste-buildpack keyword=sources ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -157,18 +157,18 @@ target=$TARGET/production/3rdparty recurse=1 [binaries] -source=$PRODUCTION_DIR/binaries -target=$TARGET/production/binaries +source=$RUNTIME_DIR/binaries +target=$TARGET/runtime/binaries recurse=1 [clam_bin] -source=$PRODUCTION_DIR/clam_bin -target=$TARGET/production/clam_bin +source=$RUNTIME_DIR/clam_bin +target=$TARGET/runtime/clam_bin recurse=1 [packages] -source=$PRODUCTION_DIR/packages -target=$TARGET/production/packages +source=$RUNTIME_DIR/packages +target=$TARGET/runtime/packages recurse=1 [win32_helper] diff --git a/scripts/bookmarks/create_marks.sh b/scripts/bookmarks/create_marks.sh index 40872bc3..359d3b12 100644 --- a/scripts/bookmarks/create_marks.sh +++ b/scripts/bookmarks/create_marks.sh @@ -21,25 +21,25 @@ if [ -f $newmarx ]; then rm $newmarx; fi if [ -f $genlinx_js ]; then rm $genlinx_js; fi if [ -f $genlinx_moz ]; then rm $genlinx_moz; fi -$PRODUCTION_DIR/binaries/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx +$RUNTIME_DIR/binaries/marks_sorter -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -o $newmarx if [ $? != 0 ]; then echo error during sorting of the bookmarks. exit 1 fi -$PRODUCTION_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx -s human +$RUNTIME_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx -s human if [ $? != 0 ]; then echo error during creation of the normal web page of bookmarks. exit 1 fi -$PRODUCTION_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx_moz -s mozilla +$RUNTIME_DIR/binaries/marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/marks_template.html -o $genlinx_moz -s mozilla if [ $? != 0 ]; then echo error during creation of the mozilla format page of bookmarks. exit 1 fi -$PRODUCTION_DIR/binaries/js_marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js +$RUNTIME_DIR/binaries/js_marks_maker -i $GRUNTOSE_DIR/Info/Twain/links_db.csv -t $GRUNTOSE_DIR/Info/Twain/js_template.html -o $genlinx_js if [ $? != 0 ]; then echo error during creation of the javascript bookmark page. exit 1 diff --git a/scripts/cgi/prepare_cgi_bin_for_apache.sh b/scripts/cgi/prepare_cgi_bin_for_apache.sh index 8407383a..543404b3 100644 --- a/scripts/cgi/prepare_cgi_bin_for_apache.sh +++ b/scripts/cgi/prepare_cgi_bin_for_apache.sh @@ -20,7 +20,7 @@ cd ~/feisty_meow/infobase cp fortunes.dat \ /usr/lib/cgi-bin -cp ~fred/feisty_meow/production/binaries/*nechung* /usr/lib/cgi-bin +cp $BINDIR/*nechung* /usr/lib/cgi-bin chmod a+x /usr/lib/cgi-bin/* diff --git a/scripts/clam/cpp/preconditions.sh b/scripts/clam/cpp/preconditions.sh index 0c1da341..391f0ef0 100755 --- a/scripts/clam/cpp/preconditions.sh +++ b/scripts/clam/cpp/preconditions.sh @@ -33,7 +33,7 @@ if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi # set versions on any extras that were specified in the makefile. if [ ! -z "$EXTRA_VERSIONS" ]; then for i in $EXTRA_VERSIONS; do - $CLAM_BIN/version_stamper$EXE_END $i $PARAMETER_FILE + $CLAM_BINARY_DIR/version_stamper$EXE_END $i $PARAMETER_FILE done fi diff --git a/scripts/clam/cpp/rules.def b/scripts/clam/cpp/rules.def index ee8c7d6f..98baec5e 100644 --- a/scripts/clam/cpp/rules.def +++ b/scripts/clam/cpp/rules.def @@ -602,7 +602,7 @@ ifeq "$(OMIT_VERSIONS)" "" ifneq "$(VERSION_RC_ROOT)" "" # only redo the version resource if it or version.ini is out of date. %_version.rc: version.ini $(PARAMETER_FILE) - $(CATCHER)$(CLAM_BIN)/version_stamper$(EXE_END) . $(PARAMETER_FILE) + $(CATCHER)$(CLAM_BINARY_DIR)/version_stamper$(EXE_END) . $(PARAMETER_FILE) endif endif @@ -688,8 +688,8 @@ else -$(HIDESH)$(CLAM_DIR)/cpp/preconditions.sh @touch $@ # @echo dep adds: $(DEPENDENCY_ADDITIONS) - @$(CLAM_BIN)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) -# $(CATCHER)$(CLAM_BIN)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) + @$(CLAM_BINARY_DIR)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) +# $(CATCHER)$(CLAM_BINARY_DIR)/makedep$(EXE_END) $(DEPENDENCY_DEFINITIONS:%=-D%) $(DEPENDENCY_ADDITIONS) -f$@ -o.obj -p$(OBJECT_DIR)/ -w 420 $(COMPILER_HEADER_DIR:%=-X%) $(THIRD_PARTY_DIR:%=-X%) -- $(COMPILER_FLAGS) $(SOURCE) $(EXE_CPPS) @echo $@ >$(SUBMAKE_FLAG) endif # non-compile. endif # no-deps. diff --git a/scripts/clam/cpp/variables.def b/scripts/clam/cpp/variables.def index 1a47d738..9a54b5a1 100644 --- a/scripts/clam/cpp/variables.def +++ b/scripts/clam/cpp/variables.def @@ -11,7 +11,7 @@ ifneq "$(BUILD_PARAMETER_FILE)" "" endif ifeq "$(PARAMETER_FILE)" "" # last ditch attempt to get one that will work. - export PARAMETER_FILE = $(PRODUCTION_DIR)/build.ini + export PARAMETER_FILE = $(PRODUCTION_DIR)/feisty_meow_config.ini endif ############################################################################### @@ -31,7 +31,7 @@ include variables.def # endif #endif -#export CLAM_BIN = $(CLAM_DIR)/../bin +#export CLAM_BINARY_DIR = $(CLAM_DIR)/../bin ############################################################################### diff --git a/scripts/clam/dotnet-retired/csharper.sh b/scripts/clam/dotnet-retired/csharper.sh new file mode 100644 index 00000000..ec476037 --- /dev/null +++ b/scripts/clam/dotnet-retired/csharper.sh @@ -0,0 +1,8 @@ +#!/bin/bash +declare -a flipped=() +for i in $*; do + flip=$(echo $i | sed -e 's/\/\([a-zA-Z]\)\//\1:\//' | tr '/' '\\') + flipped+=($flip) +done +${FRAMEWORK_DIR}/csc ${flipped[*]} + diff --git a/scripts/clam/dotnet-retired/postconditions.sh b/scripts/clam/dotnet-retired/postconditions.sh new file mode 100644 index 00000000..cbdd6bc9 --- /dev/null +++ b/scripts/clam/dotnet-retired/postconditions.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# copies the final products of the current project into the repository. + +# check whether a failure should prevent promotion from occurring. +if [ -f $FAILURE_FILE ]; then + echo Postconditions will not promote due to a failure: + cat $FAILURE_FILE + . $CLAM_DIR/exit_make.sh +fi + +# make sure that we actually did something during the make. +if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then + # nothing was built, seemingly, so we do no promotion. + exit +fi + +# toss the flag files so we don't see them again. +rm -f "$DIRTY_FILE" "$SUBMAKE_FLAG" + +# clean up generated resource files after the build. +for i in *.resources; do rm -f "$i"; done + +# these variables define the locations for final products. all of them +# descend from the root of the repository. +ROOT=$TARGETS_DIR +LIB_DIR=$ROOT/lib +DLL_DIR=$ROOT/dll +EXE_DIR=$ROOT/exe +TEST_ROOT=$ROOT/tests +TEST_DIR=$TEST_ROOT/$PROJECT + +# causes the shell to quit. +DIE=". $CLAM_DIR/exit_make.sh" + +if [ "$TYPE" = "library" ]; then + + # make sure the required directories exist. + if [ ! -d $ROOT ]; then mkdir $ROOT; fi + if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi + if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi + + if [ -z "$NO_COMPILE" ]; then + # we ensure that none of the normal products are copied for a non-compiling + # style of project. + + # copy the import libraries for any DLLs. + if [ ! -z "`$FIND "$DYNAMIC_LIBRARY_DIR" -iname "*.lib"`" ]; then + echo Moving import libraries to $LIB_DIR. + mv "$DYNAMIC_LIBRARY_DIR"/*.lib $LIB_DIR + fi + + fi + +elif [ "$TYPE" = "application" ]; then + + # sets up the directory for executable programs and copies any found in the + # this project's final directory. + + # first make sure the executable directory is around. + if [ ! -d $EXE_DIR ]; then mkdir $EXE_DIR; fi + + if [ -z "$NO_COMPILE" ]; then + # we ensure that none of the normal products are copied for a non-compiling + # style of project. + + # copy anything extra over. + if [ ! -z "$EXTRA_COPIES" ]; then + echo Copying extra files to $EXE_DIR. + echo [$EXTRA_COPIES] + cp -f $EXTRA_COPIES $EXE_DIR || $DIE + fi + + fi + +elif [ "$TYPE" = "test" ]; then + + # sets up a directory for test programs based on the project name and copies + # the generated programs into there. + + # first make sure the test program root directory is around. + if [ ! -d $TEST_ROOT ]; then mkdir $TEST_ROOT; fi + + # create the target directory if it doesn't exist. + if [ ! -d $TEST_DIR ]; then mkdir $TEST_DIR; fi + + if [ -z "$NO_COMPILE" ]; then + # we ensure that none of the normal products are copied for a non-compiling + # style of project. + + # make the files writable. this is required for some tests' data files, + # which come in from the build and could be read-only. + chmod 777 $TEST_DIR/* $TEST_DIR/*/* $TEST_DIR/*/*/* >/dev/null 2>&1 + + # copy anything extra over. + if [ ! -z "$EXTRA_COPIES" ]; then + echo Copying extra files to $TEST_DIR. + echo [$EXTRA_COPIES] + cp -f $EXTRA_COPIES $TEST_DIR || $DIE + fi + + fi + +else + echo "Unknown type for project [$TYPE]; cancelling postconditions!" + . $CLAM_DIR/exit_make.sh +fi + diff --git a/scripts/clam/dotnet-retired/preconditions.sh b/scripts/clam/dotnet-retired/preconditions.sh new file mode 100644 index 00000000..4ed64fe8 --- /dev/null +++ b/scripts/clam/dotnet-retired/preconditions.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# prepares the project for compilation by creating the appropriate directories. + +# make sure the top-level repository exists. +if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir $FEISTY_MEOW_DIR; fi +# make sure our temp directory is there. +if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi +# make sure the generated files have a home. +if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi +# create the generated files storage area. +if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi +# create the top level object directory if it doesn't exist. +if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi +# create the project level object directory if it is non-existent. +if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi +# create a directory to hold any debugging files, if necessary. +if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi +# +if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi +# +if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi +# +if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi +# +if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi + +# set versions on any extras that were specified in the makefile. +if [ ! -z "$EXTRA_VERSIONS" ]; then + for i in $EXTRA_VERSIONS; do $CLAM_BINARY_DIR/version_stamper$EXE_END $i $PARAMETER_FILE; done +fi + +# create all the directories that objects will go into. +###for i in $OUTPUT_DIRECTORY_LIST; do +### if [ ! -d "$OUTPUT_PATH/$i" ]; then mkdir "$OUTPUT_PATH/$i"; fi +###done + +# for firmware compilations set the compiler to the correct processor platform +if [ "$COMPILER" = "DIAB" ]; then + $COMPILER_CONTROL $COMPILER_CONTROL_FLAGS +fi + diff --git a/scripts/clam/dotnet-retired/readme.txt b/scripts/clam/dotnet-retired/readme.txt new file mode 100644 index 00000000..abe066a5 --- /dev/null +++ b/scripts/clam/dotnet-retired/readme.txt @@ -0,0 +1,9 @@ + + +this is out of date! + +it used to compile c# assets on windows pretty well. +now it probably does nothing. + +we intend to refurbish it for use with mono. + diff --git a/scripts/clam/dotnet-retired/rules.def b/scripts/clam/dotnet-retired/rules.def new file mode 100644 index 00000000..c58d1d99 --- /dev/null +++ b/scripts/clam/dotnet-retired/rules.def @@ -0,0 +1,262 @@ +############################################################################### + +# CLAM System default rules and targets for C++ compilation. + +# This file composite macros and rules for creating compilation objects +# (such as library archives, object files, executable programs, and others). + +# This file should be included in the user's Makefile after the variables +# have been initialized appropriately for the particular project being +# compiled. The user's own targets should be placed after the include +# directive that specifies this file. + +############################################################################### + +# This section manipulates variable values to prepare them for their use +# in the standard CLAM support. + +# Modify the output directory for executable files if we're building a +# test project. +ifeq "$(TYPE)" "test" + EXECUTABLE_DIR = $(TARGETS_DIR)/tests/$(PROJECT) + ifneq "$(CONSOLE_MODE)" "" + COMPILER_FLAGS += -target:exe + else + COMPILER_FLAGS += -target:winexe + endif +endif +ifeq "$(TYPE)" "application" + ifneq "$(CONSOLE_MODE)" "" + COMPILER_FLAGS += -target:exe + else + COMPILER_FLAGS += -target:winexe + endif +endif +ifeq "$(TYPE)" "library" + COMPILER_FLAGS += -target:library +endif + +# prep the actual source variable so that certain file names are translated. +ACTUAL_RESX = $(RESX:%.resx=%.resources) + +ifeq "$(OP_SYSTEM)" "WIN32" + ifneq "$(OMIT_VERSIONS)" "" + # remove version rc files if we're not dealing with versions. + ACTUAL_RESOURCE = $(RESOURCE:%.rc=) + else + ACTUAL_RESOURCE = $(RESOURCE:%.rc=%.res) + endif +else + # replace this when supporting resource files on unix. + ACTUAL_RESOURCE = $(RESOURCE:%.rc=) +endif + +# patch the sources so that subdirs work. +ACTUAL_SOURCE = $(SOURCE:%.cs=$(CURRENT_DIR)/%.cs) + +# visual studio settings. +ifeq "$(COMPILER)" "VISUAL_CPP" + # processes the def file for linkage, if one has been specified. + ifneq "$(DEF_FILE)" "" + LOAD_FLAG_PREFIX += -def:$(DEF_FILE) + endif + + # these are loaded after any special debugging libs. + ifneq "$(VCPP_USE_BASE)" "" + # the first set will be included in almost any old program. we include + # winmm for multimedia in the base support since we make heavy use of the + # more accurate uptime function. +# LOAD_FLAG_PREFIX += advapi32.lib kernel32.lib version.lib winmm.lib + endif +#is advapi32 really part of the base required stuff? will it work on +#win98? how about win95? + + ifneq "$(VCPP_USE_GUI)" "" + LOAD_FLAG_PREFIX += comdlg32.lib gdi32.lib user32.lib winspool.lib + endif + + ifneq "$(VCPP_USE_OLE)" "" + LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib + VCPP_USE_RPC = t + endif + ifneq "$(VCPP_USE_RPC)" "" + LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib + VCPP_USE_SOCK = t + endif + ifneq "$(VCPP_USE_SOCK)" "" + LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib + endif +endif + +# Updates the search path for the compiler and local libraries. +BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS) +HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR) + +LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \ + $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS) + +# Adds some directories that must be searched onto the search path for +# header files, such as the compiler's own special header file directory. +COMPILER_FLAGS += $(DEFINITIONS:%=-D:%) $(UNDEFINITIONS:%=-U%) +#$(HEADER_SEARCH_PATH:%=-I%) + +# The load flags are updated by looking for code libraries in the directories +# to search and by adding all of the code libraries that are used. +LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%) +LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%) + +# prepare for mfc style DLLs. currently we plan on all dlls we create being +# based on MFC. this is an unfortunate requirement for using the mfc debug +# support for allocations; if regular new and DEBUG_NEW get mixed together, +# crashes used to result. supposedly these are gone now at least. +ifneq "$(USE_MFC)" "" + # set the flag that says we are doing mfc extension dlls. + DEFINITIONS += _AFXDLL + + # add in the mfc directories. + COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include + COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib +endif + +ifeq "$(OMIT_VERSIONS)" "" + ifneq "$(VERSION_RC_ROOT)" "" + VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc + endif +endif + +# Make sure that the directory for objects exists. +ACTUAL_FIRST_TARGETS = check_requirements $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation + +# Adds the primary targets to the list of products to create. +ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe) +ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary) +ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%.so) +ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%.library) +ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf) + +# Adds the last few targets for CLAM to do. +ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS) + +############################################################################ + +# This section defines the rules used to generate various objects from their +# source files. + +############################################################################ + +# resource compiler for c#. + +%.resources: %.resx + @echo Creating resource file [$@]. + $(RC) $< $@ +# $(CATCHER)$(RC) $< $@ + +############################################################################ + +# resource compiler for standard resource files. + +ifeq "$(OP_SYSTEM)" "WIN32" +%.res: %.rc + @echo Creating resource file [$@]. +ifeq "$(NO_COMPILE)" "" + $(CATCHER)$(STANDARD_RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $< +endif +endif + +############################################################################ + +# creates dynamic libraries. + +# we whack any existing LIB file, since we want to use changes in that file +# as a clue for when we should rescan the dependencies. we'd be fine if +# visual c++ didn't keep an existing LIB if it doesn't change (even when the +# DLL does). + +$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) + $(HIDER)echo Creating dynamic library [$@]. + @echo $@ >$(DIRTY_FILE) + $(HIDER)rm -f $(@:%.dll=%.lib) + $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) +ifneq "$(VCPP_VISTA_ICON)" "" + $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" +endif + $(HIDER)mv $@ $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) +ifneq "$(CREATE_TLB)" "" + $(CATCHER)$(TLBEXPORT) $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -out:$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*.tlb +endif + $(HIDER)echo nil >$@ + +#$(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) + +############################################################################ + +# creates "exe" executables using all of the appropriate objects. +$(EXECUTABLE_DIR)/%.exe: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) + $(HIDER)echo Building program [$@]. + @echo $@ >$(DIRTY_FILE) + $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) +ifneq "$(VCPP_VISTA_ICON)" "" + $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" +endif + +############################################################################ + +# handles creating version resource files if this project has a version.ini. + +ifeq "$(OMIT_VERSIONS)" "" + ifneq "$(VERSION_RC_ROOT)" "" +# only redo the version resource if it or version.ini is out of date. +%_version.rc: version.ini $(PARAMETER_FILE) + $(CATCHER)$(CLAM_BINARY_DIR)/version_stamper$(EXE_END) . $(PARAMETER_FILE) + endif +endif + +############################################################################ + +# Now the active part of the make process... + +# Adds the main CLAM system in to get some work done. This should be placed +# after the module's rules are defined and before the module's targets are +# defined. +include rules.def + +# preserves intermediate files from being deleted. +##.PRECIOUS: %.resources + +# zaps things when they could not be created correctly. +.DELETE_ON_ERROR: + +############################################################################ + +# examines the required variables and complains if they're missing. +check_requirements: + $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi' + $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi' + +############################################################################ + +# calls the script for preparing output directories and such. +pre_compilation: + $(HIDESH)$(CLAM_DIR)/csharp/preconditions.sh + +############################################################################ + +# calls the script for copying the final products to the library directory. +# we don't bother reporting errors from touch since there will sometimes +# not be any objects in the final directory. +post_compilation: + $(HIDESH)$(CLAM_DIR)/csharp/postconditions.sh + +############################################################################ + +# if REBUILD is defined, then we cause all objects to be recompiled. +.PHONY: force_rebuild +force_rebuild: + +ifneq "$(REBUILD)" "" + # the target below needs the blank rule that it has for this to work. + $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(LAST_TARGETS): force_rebuild +endif + +############################################################################ + diff --git a/scripts/clam/dotnet-retired/variables.def b/scripts/clam/dotnet-retired/variables.def new file mode 100644 index 00000000..94fcccf5 --- /dev/null +++ b/scripts/clam/dotnet-retired/variables.def @@ -0,0 +1,514 @@ +############################################################################### + +# CLAM System default variable definitions for C# compilation. + +############################################################################### + +# Pull in the base support for CLAM. +include variables.def + +############################################################################### + +#CLAM_BINARY_DIR = $(CLAM_DIR)/../bin + +############################################################################### + +ifneq "$(BUILD_PARAMETER_FILE)" "" + # define our version of the build parameter file. this should be set + # beforehand so we override the default parameter file for clam. + export PARAMETER_FILE = $(BUILD_PARAMETER_FILE) +###no: $(FEISTY_MEOW_DIR)/build/identity.ini +endif +ifeq "$(PARAMETER_FILE)" "" + # last ditch attempt to get one that will work. + export PARAMETER_FILE = $(FEISTY_MEOW_DIR)/build.ini +endif + +############################################################################### + +# BASE_CPU is a flag that distinguishes the type of processor, if necessary. +export BASE_CPU +#BASE_CPU = m68k + # motorola 68000 series. +#BASE_CPU = m68340 + # motorola 68340. +#BASE_CPU = x86 + # intel x86. +#BASE_CPU = ppc860 + # power pc 860. + +# set the CPU default if we do not have one. +ifeq "$(BASE_CPU)" "" + BASE_CPU = x86 +endif + +# COMPILER is a flag that specifies the operating system or the compiler for +# use in conditional compilation (#ifdef ... #endif) of the compiler dependent +# interfaces or implementations. +export COMPILER +#COMPILER = VISUAL_CPP + +# choose a default compiler if none was specified. +ifeq "$(COMPILER)" "" + COMPILER = VISUAL_CPP +endif + +# COMPILER_VERSION specifies the version of a particular compiler, if this is +# needed to distinguish how the code is built. +export COMPILER_VERSION + +############################################################################### + +# "TYPE" is the kind of product being generated by this project. this is +# used to decide where to put the final products of compilation. this is a +# variable in the user's makefile. +# Valid Types: +# TYPE = library (outputs are static or dynamic libraries) +# TYPE = application (outputs are main-line executables) +# TYPE = test (outputs are test programs) +export TYPE + +############################################################################### + +# pseudo-boolean variable section. if these have any value at all, then they +# are treated as being true. note that these are flags that should generally +# be passed on the command line to a make. if they are intended to be used +# from inside a makefile, then they must appear before this file is included. + +# "REBUILD" causes a rebuild of all source files if it's true. +export REBUILD + +# "DEBUG" is used to specify a debugging build. the default is for this to +# be false, which causes a release build. +export DEBUG + +# "OPTIMIZE" creates optimized code. +export OPTIMIZE + +# "NO_COMPILE" just runs through the targets without compiling. it still +# promotes headers however. +export NO_COMPILE + +# "BUILD_LIST_FILE" is the set of files that need to be recompiled for +# visual c++. +export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT) + +# "BUILD_WHACK_FILE" is the set of object files that should be removed if +# a build failure occurs. +export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT) + +# we're adding the build list to the flag files so we know it gets cleaned up. +FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE) + +############################################################################### + +# This section implements the HOOPLE directory scheme. If your scheme differs, +# then you'll want to modify these appropriately. + +# "THIRD_PARTY_DIR" is the root of our support libraries. +ifeq "$(OP_SYSTEM)" "UNIX" + export THIRD_PARTY_DIR +endif +ifeq "$(OP_SYSTEM)" "WIN32" + export THIRD_PARTY_DIR = $(FEISTY_MEOW_DIR)/3rdparty +endif + +# "OUTPUT_ROOT" is the root of all output directories for objects and other +# products being built. +export OUTPUT_ROOT = $(TARGETS_DIR)/obj + +# "PLATFORM_ADD_IN" is an option discriminator for the intended execution +# platform. it should end in an underscore if it is provided. +#PLATFORM_ADD_IN = linux_ +#PLATFORM_ADD_IN = w32_ +PLATFORM_ADD_IN = + +# "CPU_BUILD_DIR" distinguishes object directories by including the cpu +# name and the type of build. +ifneq "$(DEBUG)" "" + CPU_BUILD_DIR = $(BASE_CPU)_dbg +else + CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel +endif + +# "BASE_OUTPUT_PATH" is the parent directory of objects for this type of +# cpu and this type of build. +export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR) + +# "OUTPUT_PATH" is the directory to generate all compiled products into. +export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT) + +# "OBJECT_DIR" is where object files will be stored during compilation for the +# target type being produced. +export OBJECT_DIR = $(OUTPUT_PATH) + +# These specify where files are to be created or located for our local build. +export EXECUTABLE_DIR = $(TARGETS_DIR)/exe +export DYNAMIC_LIBRARY_DIR = $(TARGETS_DIR)/dll +export STATIC_LIBRARY_DIR = $(TARGETS_DIR)/lib +export TESTS_DIR = $(TARGETS_DIR)/tests + +# "HEADER_SEARCH_PATH" is where the class interface files are to be found. +#HEADER_SEARCH_PATH = + +# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found. +HOOPLE_HEADERS := $(shell $(FIND) $(FEISTY_MEOW_DIR)/source/lib_src $(FEISTY_MEOW_DIR)/libraries -mindepth 1 -maxdepth 1 -type d) + +# "LOCAL_HEADERS" are overrides that go first in the header search path. +#LOCAL_HEADERS = + +# "CODEBASE_HEADERS" is a list that can be changed for a particular codebase. +# it is guaranteed that clam will not interfere with this list, whereas +# the LOCAL_HEADERS can be modified by clam. +#CODEBASE_HEADERS = + +# "LOCAL_LIBRARIES" are overrides that go first in the library search path. +#LOCAL_LIBRARIES = + +# "LIBRARY_SEARCH_PATH" is where the library files are to be found. +#LIBRARY_SEARCH_PATH = + +# "HOOPLE_LIBRARIES" is where our local libraries are located. +HOOPLE_LIBRARIES = + +# "EXTRA_COPIES" is a list of files that are copied to a project's output +# directory. +export EXTRA_COPIES + +# "EXTRA_VERSIONS" is a list of version files to synchronize with the main +# library version for this build. if a file called "version.ini" exists in +# the project directory, then it will automatically be upgraded, so the +# extra version files are mainly useful when you have a project with multiple +# programs in it and you want them to have independent version files (as you +# should perhaps want). +export EXTRA_VERSIONS + +# "OMIT_VERSIONS" is another exclusion flag. this one turns off the creation +# of version resource files and eliminates any references that would include +# such files. this is needed when rebuilding version_stamper. +#OMIT_VERSIONS = t + +# Add the obligatory junk to be cleaned up. Individual compiler sections +# should customize this by adding their object output directories. +CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH) +#hmmm: import libs for dynamic libraries on ms-win32 don't currently get +# cleaned up nicely. + +############################################################################### + +# "SEARCH_DIRS" is a list of directories that should be searched for both C++ +# header files and for C++ code libraries. The items placed in SEARCH_DIRS +# are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH. +#SEARCH_DIRS = + +# "DEFINITIONS" is a list of compiler flags that define the value of c macros. +# These usually have the format of -D, but in this variable, only the +# itself should be listed because the compiler option -D is added +# automatically. +DEFINITIONS = CLAM_BUILT + +ifneq "$(BOOT_STRAPPING)" "" + # the software is being built from the ground up, including the binaries + # we use for building (like value_tagger and others). + DEFINITIONS += BOOT_STRAPPING +endif + +# "UNDEFINITIONS" is a list of macros to undefine. +#UNDEFINITIONS = + +#hmmm: these kinds of defines (with a value) do not work for csharp. +# GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base +# with some branding. It is provided as a macro definition to all source +# files. The initial value for the macro should come from the build init +# file, but if it doesn't, we pick a default. +##ifeq "$(product_name)" "" +## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"HOOPLE\\\" +##else +## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"$(product_name)\\\" +##endif + +# *_PRODUCT_VERSION records parts of our version numbers for the code to see. +###DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor) + +# "DEBUG_FLAGS" these flags are used for generating specialized versions of +# object files, such as ones that include debugging code or that add code for +# profiling. +# Possible values are -g for adding GDB debugging code and -pg for adding +# gprof profiling code. +#DEBUG_FLAGS = -g +#DEBUG_FLAGS = -pg +#DEBUG_FLAGS = + +# "COMPILER_FLAGS" are the flags for the pre-processor and compiler. +#COMPILER_FLAGS = + +# "STRICT_WARNINGS" turns on all warnings and forces them to be considered +# as errors when encountered. +#STRICT_WARNINGS = + +# "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool +# that creates static code libraries. +#LIBRARIAN_FLAGS = + +# "SOURCE" is the list of files that are turned into objects. +#SOURCE = + +# "LIBS_USED" are system or compiler code libraries that the targets to be +# created depend upon. +#LIBS_USED = + +# "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries +# actually cause executables and object files to be recompiled when the +# libraries specified have changed. To accomplish this, these libraries MUST +# be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place +# on the LIBRARY_SEARCH_PATH. +#LOCAL_LIBS_USED = + +# Load flags tell the linker and loader how to deal with the files and where +# to locate library components. The prefix goes before object files are +# listed, and the suffix after. The prefix should have things like the +# directories to be searched for code libraries (although they should be added +# to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic). +# In the suffix, actual library loading statements (like -lmath) can be +# included (although they should be listed in a different form in LIBS_USED). +# Remember that the unix loader looks for functions in libraries in a bizarre +# way: ld searches for a function only when it has already been asked for it. +# This means that it doesn't remember what functions it has already been +# provided with in the libraries and object files, and it will fail if those +# functions are only asked for after they have already been encountered. +#LOAD_FLAG_PREFIX = +#LOAD_FLAG_SUFFIX = + +# The prefix used on library names, mostly for unix. +LIB_PREFIX = +# The standard suffix for static or import libraries on this operating system. +LIB_ENDING = + +# Flag for specifying the library name to create. +#CREATE_LIBRARY_FLAG = + +# Flag for specifying a library to include in linking. +LIBRARY_NAME_FLAG = -l + +# Flag for specifying a directory to add to the search path for libs. +#LIBRARY_PATH_FLAG = -L + +# Flag for specifying the name of an output from the linker. +#LINKER_OUTPUT_FLAG = + +# Flag for separating linker options from compilation options for a combined +# compiler / linker. +#LINKER_OPTION_SEPARATOR = + +# Flag that passes special options when building executable programs. It is +# passed just before the LOAD_FLAG_PREFIX. +#EXE_FLAGS = + +# The name of the compiler tool. +#CC = + +# The name of the library creator tool. +#LIBRARY_TOOL = + +# the root name of the version file. This is currently irrelevant on +# non-win32 platforms. +VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_DIR)/cpp/rc_name.sh) + # we import the rc_name from our close ally, the c++ compiler definitions. + +############################################################################### + +# Compiler Dependent Flags +# +# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. +# "COMPILER_HEADER_DIR" is where the compiler's headers are. +export COMPILER_HEADER_DIR +# "COMPILER_LIBRARY_DIR" is where archived libraries are. +# "CC" is the name of the C++ compiler to be used. + +ifeq "$(COMPILER)" "VISUAL_CPP" + # microsoft visual studio 7. + + LIB_ENDING = .dll + PLATFORM_ADD_IN = w32_ + + # these define special characteristics for a program being built. + # BASE is almost always defined and pulls in fundamental w32 support. + # RPC supplies the remote procedure call libraries. + # OLE pulls in object linking and embedding support. + # SECURITY links with the w32 security APIs. + # CLR sets options that are appropriate for managed code. + VCPP_USE_BASE=true + VCPP_USE_RPC= + VCPP_USE_OLE= + VCPP_USE_SECURITY= + VCPP_USE_CLR= + VCPP_VISTA_ICON= + + # the framework dir points at the .net framework to be used for compilation. + ifeq "$(FRAMEWORK_VERSION)" "" + + # older .net 1.1. +# SHORT_FRAMEWORK_VERSION = 1.1 +# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322 + + # old .net 2.0. +# SHORT_FRAMEWORK_VERSION = 2.0 +# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727 + + # current .net 3.5. + SHORT_FRAMEWORK_VERSION = 3.5 + FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION) + + endif + export FRAMEWORK_DIR + ifeq "$(FRAMEWORK_DIR)" "" + FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION) + endif + + # pick a default compiler version for what we tend to use the most at the + # current time. + ifeq "$(COMPILER_VERSION)" "" + COMPILER_VERSION = 7 + endif +## DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION) + # add a macro so programs can check what version is appropriate. + + # C# needs an entry point for exes. a different one can be specified also. + ENTRY_POINT = main + + # C# treats resources differently than simple code files. the list in this + # variable will be embedded in the target. + #RESX = + + # TLBEXPORT is a tool to create TLB files from DLL files. + TLBEXPORT = $(COMPILER_ROOT_DIR)/../SDK/v$(SHORT_FRAMEWORK_VERSION)/bin/tlbexp$(EXE_END) + + # calculate the visual studio root directory. + export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh $(CLAM_BINARY_DIR) ) + ifneq "$(VIS_STU_ROOT)" "" + COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc# + endif + ifeq "$(COMPILER_ROOT_DIR)" "" + HOSEUP = $(shell echo The compiler directory is not set. Please define the environment ) + HOSEUP = $(shell echo variable VSxCOMNTOOLS to point at the folder where visual C++ is installed. ) + HOSEUP = + endif + + export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_DIR)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) + + # set a variable for the resource compiler for old-style resources. + STANDARD_RC = $(VIS_STU_ROOT)/vc/bin/rc + + # set up a directory for debugging files to be stored. these are not + # moved with the postconditions--they are generated in place. + export PDB_DIR=$(TARGETS_DIR)/pdb + + # set these way up here so we can override them later. + CC = bash $(CLAM_DIR)/csharp/csharper.sh +##$(FRAMEWORK_DIR)/csc + +# LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link + + # vary the locations for compiler files based on the version. + COMPILER_HEADER_DIR = $(VIS_STU_ROOT)/vc/include $(VIS_STU_ROOT)/vc/atlmfc/include $(VIS_STU_ROOT)/vc/platformsdk/include + COMPILER_LIBRARY_DIR = +###$(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib + RC = $(COMPILER_ROOT_DIR)/../SDK/v2.0/bin/resgen$(EXE_END) + + ifeq "$(COMPILER_HEADER_DIR)" "" + HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) + endif + + DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32_WINNT=0x403 + DEF_FILE = + LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib + LOAD_FLAG_PREFIX = -nologo +#-subsystem:windows -machine:IX86 + LOAD_FLAG_SUFFIX = + + MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-I% ) + MIDL_DEFS = -no_robust + + # set the flags used by visual c++. + CREATE_LIBRARY_FLAG = -out: + LIBRARY_NAME_FLAG = -reference: + LIBRARY_PATH_FLAG = -lib: + LINKER_OPTION_SEPARATOR = -link + LINKER_OUTPUT_FLAG = -out: + + # Add the extra files created by visual c++. +#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db + + # put the common flags into the compiler flags. + COMPILER_FLAGS += -nologo +#-Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -GX -W3 -Zi -EHsc -GS -Gd + + ifneq "$(DEBUG)" "" + # disable function inlining and optimizations for debug. +# COMPILER_FLAGS += -Ob0 -Od + else + # enable function inlining for release only. +# COMPILER_FLAGS += -Ob1 + + ifneq "$(OPTIMIZE)" "" + # add in fast code optimization. +#testing... +# COMPILER_FLAGS += -O2 +#trying O2 again although it seems to combust too easily. + else + # no optimizations. + endif + + endif + + # check if profiling is to be enabled. + PROFILER_FLAG = + ifneq "$(PROFILE)" "" + PROFILER_FLAG = -profile + endif + + # add the common linker flags. the debugging flag is added because we + # want to be able to debug into release code, but since the pdb files + # are separate, we're not exposing ourselves when we don't include them. + LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug +#-warn:3 + + # "USE_MFC" dictates whether mfc should be allowed in the application. + # the default is not to use MFC extension style dlls. this can be turned + # on in the individual makefiles that require MFC. + #USE_MFC = + + # the library creator gets a couple of flags. + LIBRARIAN_FLAGS += -nologo -machine:IX86 + + # now, vary the flag configuration based on the flags that have been set. + + ifneq "$(CONSOLE_MODE)" "" + # console type of applications are built using the static flag so that + # they are more redistributable. + DEFINITIONS += _CONSOLE +### LOAD_FLAG_SUFFIX += -subsystem:console + STATIC = true + endif + + # dynamically linked library or application flags. + ifneq "$(DEBUG)" "" + # debug. + DEFINITIONS += _DEBUG +# COMPILER_FLAGS += -MDd + else + # release. + DEFINITIONS += NDEBUG +# COMPILER_FLAGS += -MD + endif + + ifneq "$(STRICT_WARNINGS)" "" +# COMPILER_FLAGS += -W3 -WX + # we have not turned on W4 because it is not really warnings for the + # microsoft compiler. instead, it is a bunch of blather about what the + # compiler intends to do rather than problems in the code. + endif + +endif + + diff --git a/scripts/clam/dotnet/csharper.sh b/scripts/clam/dotnet/csharper.sh deleted file mode 100644 index ec476037..00000000 --- a/scripts/clam/dotnet/csharper.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -declare -a flipped=() -for i in $*; do - flip=$(echo $i | sed -e 's/\/\([a-zA-Z]\)\//\1:\//' | tr '/' '\\') - flipped+=($flip) -done -${FRAMEWORK_DIR}/csc ${flipped[*]} - diff --git a/scripts/clam/dotnet/postconditions.sh b/scripts/clam/dotnet/postconditions.sh deleted file mode 100644 index cbdd6bc9..00000000 --- a/scripts/clam/dotnet/postconditions.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/bash -# copies the final products of the current project into the repository. - -# check whether a failure should prevent promotion from occurring. -if [ -f $FAILURE_FILE ]; then - echo Postconditions will not promote due to a failure: - cat $FAILURE_FILE - . $CLAM_DIR/exit_make.sh -fi - -# make sure that we actually did something during the make. -if [ ! -f "$DIRTY_FILE" -a ! -f "$SUBMAKE_FLAG" ]; then - # nothing was built, seemingly, so we do no promotion. - exit -fi - -# toss the flag files so we don't see them again. -rm -f "$DIRTY_FILE" "$SUBMAKE_FLAG" - -# clean up generated resource files after the build. -for i in *.resources; do rm -f "$i"; done - -# these variables define the locations for final products. all of them -# descend from the root of the repository. -ROOT=$TARGETS_DIR -LIB_DIR=$ROOT/lib -DLL_DIR=$ROOT/dll -EXE_DIR=$ROOT/exe -TEST_ROOT=$ROOT/tests -TEST_DIR=$TEST_ROOT/$PROJECT - -# causes the shell to quit. -DIE=". $CLAM_DIR/exit_make.sh" - -if [ "$TYPE" = "library" ]; then - - # make sure the required directories exist. - if [ ! -d $ROOT ]; then mkdir $ROOT; fi - if [ ! -d $LIB_DIR ]; then mkdir $LIB_DIR; fi - if [ ! -d $DLL_DIR ]; then mkdir $DLL_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # copy the import libraries for any DLLs. - if [ ! -z "`$FIND "$DYNAMIC_LIBRARY_DIR" -iname "*.lib"`" ]; then - echo Moving import libraries to $LIB_DIR. - mv "$DYNAMIC_LIBRARY_DIR"/*.lib $LIB_DIR - fi - - fi - -elif [ "$TYPE" = "application" ]; then - - # sets up the directory for executable programs and copies any found in the - # this project's final directory. - - # first make sure the executable directory is around. - if [ ! -d $EXE_DIR ]; then mkdir $EXE_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # copy anything extra over. - if [ ! -z "$EXTRA_COPIES" ]; then - echo Copying extra files to $EXE_DIR. - echo [$EXTRA_COPIES] - cp -f $EXTRA_COPIES $EXE_DIR || $DIE - fi - - fi - -elif [ "$TYPE" = "test" ]; then - - # sets up a directory for test programs based on the project name and copies - # the generated programs into there. - - # first make sure the test program root directory is around. - if [ ! -d $TEST_ROOT ]; then mkdir $TEST_ROOT; fi - - # create the target directory if it doesn't exist. - if [ ! -d $TEST_DIR ]; then mkdir $TEST_DIR; fi - - if [ -z "$NO_COMPILE" ]; then - # we ensure that none of the normal products are copied for a non-compiling - # style of project. - - # make the files writable. this is required for some tests' data files, - # which come in from the build and could be read-only. - chmod 777 $TEST_DIR/* $TEST_DIR/*/* $TEST_DIR/*/*/* >/dev/null 2>&1 - - # copy anything extra over. - if [ ! -z "$EXTRA_COPIES" ]; then - echo Copying extra files to $TEST_DIR. - echo [$EXTRA_COPIES] - cp -f $EXTRA_COPIES $TEST_DIR || $DIE - fi - - fi - -else - echo "Unknown type for project [$TYPE]; cancelling postconditions!" - . $CLAM_DIR/exit_make.sh -fi - diff --git a/scripts/clam/dotnet/preconditions.sh b/scripts/clam/dotnet/preconditions.sh deleted file mode 100644 index 2fe3e79b..00000000 --- a/scripts/clam/dotnet/preconditions.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -# prepares the project for compilation by creating the appropriate directories. - -# make sure the top-level repository exists. -if [ ! -d $FEISTY_MEOW_DIR ]; then mkdir $FEISTY_MEOW_DIR; fi -# make sure our temp directory is there. -if [ ! -d $CLAM_TMP ]; then mkdir $CLAM_TMP; fi -# make sure the generated files have a home. -if [ ! -d $TARGETS_DIR ]; then mkdir $TARGETS_DIR; fi -# create the generated files storage area. -if [ ! -d $OUTPUT_ROOT ]; then mkdir $OUTPUT_ROOT; fi -# create the top level object directory if it doesn't exist. -if [ ! -d $BASE_OUTPUT_PATH ]; then mkdir $BASE_OUTPUT_PATH; fi -# create the project level object directory if it is non-existent. -if [ ! -d $OUTPUT_PATH ]; then mkdir $OUTPUT_PATH; fi -# create a directory to hold any debugging files, if necessary. -if [ ! -d $PDB_DIR ]; then mkdir $PDB_DIR; fi -# -if [ ! -d $TESTS_DIR ]; then mkdir $TESTS_DIR; fi -# -if [ ! -d $EXECUTABLE_DIR ]; then mkdir $EXECUTABLE_DIR; fi -# -if [ ! -d $DYNAMIC_LIBRARY_DIR ]; then mkdir $DYNAMIC_LIBRARY_DIR; fi -# -if [ ! -d $STATIC_LIBRARY_DIR ]; then mkdir $STATIC_LIBRARY_DIR; fi - -# set versions on any extras that were specified in the makefile. -if [ ! -z "$EXTRA_VERSIONS" ]; then - for i in $EXTRA_VERSIONS; do $CLAM_BIN/version_stamper$EXE_END $i $PARAMETER_FILE; done -fi - -# create all the directories that objects will go into. -###for i in $OUTPUT_DIRECTORY_LIST; do -### if [ ! -d "$OUTPUT_PATH/$i" ]; then mkdir "$OUTPUT_PATH/$i"; fi -###done - -# for firmware compilations set the compiler to the correct processor platform -if [ "$COMPILER" = "DIAB" ]; then - $COMPILER_CONTROL $COMPILER_CONTROL_FLAGS -fi - diff --git a/scripts/clam/dotnet/readme.txt b/scripts/clam/dotnet/readme.txt deleted file mode 100644 index abe066a5..00000000 --- a/scripts/clam/dotnet/readme.txt +++ /dev/null @@ -1,9 +0,0 @@ - - -this is out of date! - -it used to compile c# assets on windows pretty well. -now it probably does nothing. - -we intend to refurbish it for use with mono. - diff --git a/scripts/clam/dotnet/rules.def b/scripts/clam/dotnet/rules.def deleted file mode 100644 index 60af3689..00000000 --- a/scripts/clam/dotnet/rules.def +++ /dev/null @@ -1,262 +0,0 @@ -############################################################################### - -# CLAM System default rules and targets for C++ compilation. - -# This file composite macros and rules for creating compilation objects -# (such as library archives, object files, executable programs, and others). - -# This file should be included in the user's Makefile after the variables -# have been initialized appropriately for the particular project being -# compiled. The user's own targets should be placed after the include -# directive that specifies this file. - -############################################################################### - -# This section manipulates variable values to prepare them for their use -# in the standard CLAM support. - -# Modify the output directory for executable files if we're building a -# test project. -ifeq "$(TYPE)" "test" - EXECUTABLE_DIR = $(TARGETS_DIR)/tests/$(PROJECT) - ifneq "$(CONSOLE_MODE)" "" - COMPILER_FLAGS += -target:exe - else - COMPILER_FLAGS += -target:winexe - endif -endif -ifeq "$(TYPE)" "application" - ifneq "$(CONSOLE_MODE)" "" - COMPILER_FLAGS += -target:exe - else - COMPILER_FLAGS += -target:winexe - endif -endif -ifeq "$(TYPE)" "library" - COMPILER_FLAGS += -target:library -endif - -# prep the actual source variable so that certain file names are translated. -ACTUAL_RESX = $(RESX:%.resx=%.resources) - -ifeq "$(OP_SYSTEM)" "WIN32" - ifneq "$(OMIT_VERSIONS)" "" - # remove version rc files if we're not dealing with versions. - ACTUAL_RESOURCE = $(RESOURCE:%.rc=) - else - ACTUAL_RESOURCE = $(RESOURCE:%.rc=%.res) - endif -else - # replace this when supporting resource files on unix. - ACTUAL_RESOURCE = $(RESOURCE:%.rc=) -endif - -# patch the sources so that subdirs work. -ACTUAL_SOURCE = $(SOURCE:%.cs=$(CURRENT_DIR)/%.cs) - -# visual studio settings. -ifeq "$(COMPILER)" "VISUAL_CPP" - # processes the def file for linkage, if one has been specified. - ifneq "$(DEF_FILE)" "" - LOAD_FLAG_PREFIX += -def:$(DEF_FILE) - endif - - # these are loaded after any special debugging libs. - ifneq "$(VCPP_USE_BASE)" "" - # the first set will be included in almost any old program. we include - # winmm for multimedia in the base support since we make heavy use of the - # more accurate uptime function. -# LOAD_FLAG_PREFIX += advapi32.lib kernel32.lib version.lib winmm.lib - endif -#is advapi32 really part of the base required stuff? will it work on -#win98? how about win95? - - ifneq "$(VCPP_USE_GUI)" "" - LOAD_FLAG_PREFIX += comdlg32.lib gdi32.lib user32.lib winspool.lib - endif - - ifneq "$(VCPP_USE_OLE)" "" - LOAD_FLAG_PREFIX += ole32.lib oleaut32.lib uuid.lib - VCPP_USE_RPC = t - endif - ifneq "$(VCPP_USE_RPC)" "" - LOAD_FLAG_PREFIX += rpcndr.lib rpcns4.lib rpcrt4.lib - VCPP_USE_SOCK = t - endif - ifneq "$(VCPP_USE_SOCK)" "" - LOAD_FLAG_PREFIX += netapi32.lib ws2_32.lib - endif -endif - -# Updates the search path for the compiler and local libraries. -BASE_HEADER_PATH = $(CODEBASE_HEADERS) $(LOCAL_HEADERS) $(HOOPLE_HEADERS) $(SEARCH_DIRS) -HEADER_SEARCH_PATH += $(BASE_HEADER_PATH) $(COMPILER_HEADER_DIR) - -LIBRARY_SEARCH_PATH += $(LOCAL_LIBRARIES) $(HOOPLE_LIBRARIES) \ - $(STATIC_LIBRARY_DIR) $(COMPILER_LIBRARY_DIR) $(SEARCH_DIRS) - -# Adds some directories that must be searched onto the search path for -# header files, such as the compiler's own special header file directory. -COMPILER_FLAGS += $(DEFINITIONS:%=-D:%) $(UNDEFINITIONS:%=-U%) -#$(HEADER_SEARCH_PATH:%=-I%) - -# The load flags are updated by looking for code libraries in the directories -# to search and by adding all of the code libraries that are used. -LOAD_FLAG_PREFIX += $(LIBRARY_SEARCH_PATH:%=$(LIBRARY_PATH_FLAG)%) -LOAD_FLAG_PREFIX += $(LIBS_USED:%=$(LIBRARY_NAME_FLAG)%) - -# prepare for mfc style DLLs. currently we plan on all dlls we create being -# based on MFC. this is an unfortunate requirement for using the mfc debug -# support for allocations; if regular new and DEBUG_NEW get mixed together, -# crashes used to result. supposedly these are gone now at least. -ifneq "$(USE_MFC)" "" - # set the flag that says we are doing mfc extension dlls. - DEFINITIONS += _AFXDLL - - # add in the mfc directories. - COMPILER_HEADER_DIR += $(COMPILER_ROOT_DIR)/mfc/include - COMPILER_LIBRARY_DIR += $(COMPILER_ROOT_DIR)/mfc/lib -endif - -ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" - VERSION_TARGET = $(VERSION_RC_ROOT)_version.rc - endif -endif - -# Make sure that the directory for objects exists. -ACTUAL_FIRST_TARGETS = check_requirements $(VERSION_TARGET) $(FIRST_TARGETS) pre_compilation - -# Adds the primary targets to the list of products to create. -ACTUAL_TARGETS1 = $(TARGETS:%.exe=$(EXECUTABLE_DIR)/%.exe) -ACTUAL_TARGETS2 = $(ACTUAL_TARGETS1:%.dll=$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary) -ACTUAL_TARGETS3 = $(ACTUAL_TARGETS2:%.so=$(DYNAMIC_LIBRARY_DIR)/%.so) -ACTUAL_TARGETS4 = $(ACTUAL_TARGETS3:%.lib=$(STATIC_LIBRARY_DIR)/%.library) -ACTUAL_TARGETS = $(ACTUAL_TARGETS4:%.elf=$(EXECUTABLE_DIR)/%.elf) - -# Adds the last few targets for CLAM to do. -ACTUAL_LAST_TARGETS = post_compilation $(LAST_TARGETS) - -############################################################################ - -# This section defines the rules used to generate various objects from their -# source files. - -############################################################################ - -# resource compiler for c#. - -%.resources: %.resx - @echo Creating resource file [$@]. - $(RC) $< $@ -# $(CATCHER)$(RC) $< $@ - -############################################################################ - -# resource compiler for standard resource files. - -ifeq "$(OP_SYSTEM)" "WIN32" -%.res: %.rc - @echo Creating resource file [$@]. -ifeq "$(NO_COMPILE)" "" - $(CATCHER)$(STANDARD_RC) -r $(DEFINITIONS:%=-D%) $(HEADER_SEARCH_PATH:%=-i%) -fo $@ $< -endif -endif - -############################################################################ - -# creates dynamic libraries. - -# we whack any existing LIB file, since we want to use changes in that file -# as a clue for when we should rescan the dependencies. we'd be fine if -# visual c++ didn't keep an existing LIB if it doesn't change (even when the -# DLL does). - -$(DYNAMIC_LIBRARY_DIR)/%.dynlibrary: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) - $(HIDER)echo Creating dynamic library [$@]. - @echo $@ >$(DIRTY_FILE) - $(HIDER)rm -f $(@:%.dll=%.lib) - $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) -ifneq "$(VCPP_VISTA_ICON)" "" - $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" -endif - $(HIDER)mv $@ $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -ifneq "$(CREATE_TLB)" "" - $(CATCHER)$(TLBEXPORT) $(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*$(LIB_ENDING) -out:$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)$*.tlb -endif - $(HIDER)echo nil >$@ - -#$(LINKER_OUTPUT_FLAG)$@ -dll $(LOAD_FLAG_PREFIX) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) - -############################################################################ - -# creates "exe" executables using all of the appropriate objects. -$(EXECUTABLE_DIR)/%.exe: $(LOCAL_LIBS_USED:%=$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(ACTUAL_RESX) $(ACTUAL_SOURCE) $(ACTUAL_RESOURCE) - $(HIDER)echo Building program [$@]. - @echo $@ >$(DIRTY_FILE) - $(CATCHER)$(CC) $(COMPILER_FLAGS) $(EXE_FLAGS) $(LOAD_FLAG_PREFIX) $(LOCAL_LIBS_USED:%=$(LIBRARY_NAME_FLAG)$(DYNAMIC_LIBRARY_DIR)/$(LIB_PREFIX)%$(LIB_ENDING)) $(LOAD_FLAG_SUFFIX) $(LINKER_OUTPUT_FLAG)$@ $(ACTUAL_SOURCE) $(ACTUAL_RESX:%=-res:%) $(ACTUAL_RESOURCE:%=-win32res:%) -ifneq "$(VCPP_VISTA_ICON)" "" - $(HIDER)ReplaceVistaIcon "$@" "$(VCPP_VISTA_ICON)" -endif - -############################################################################ - -# handles creating version resource files if this project has a version.ini. - -ifeq "$(OMIT_VERSIONS)" "" - ifneq "$(VERSION_RC_ROOT)" "" -# only redo the version resource if it or version.ini is out of date. -%_version.rc: version.ini $(PARAMETER_FILE) - $(CATCHER)$(CLAM_BIN)/version_stamper$(EXE_END) . $(PARAMETER_FILE) - endif -endif - -############################################################################ - -# Now the active part of the make process... - -# Adds the main CLAM system in to get some work done. This should be placed -# after the module's rules are defined and before the module's targets are -# defined. -include rules.def - -# preserves intermediate files from being deleted. -##.PRECIOUS: %.resources - -# zaps things when they could not be created correctly. -.DELETE_ON_ERROR: - -############################################################################ - -# examines the required variables and complains if they're missing. -check_requirements: - $(HIDESH) -c 'if [ -z "$(PROJECT)" ]; then echo the PROJECT variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi' - $(HIDESH) -c 'if [ -z "$(TYPE)" ]; then echo the TYPE variable is not defined!; . $(CLAM_DIR)/exit_make.sh; fi' - -############################################################################ - -# calls the script for preparing output directories and such. -pre_compilation: - $(HIDESH)$(CLAM_DIR)/csharp/preconditions.sh - -############################################################################ - -# calls the script for copying the final products to the library directory. -# we don't bother reporting errors from touch since there will sometimes -# not be any objects in the final directory. -post_compilation: - $(HIDESH)$(CLAM_DIR)/csharp/postconditions.sh - -############################################################################ - -# if REBUILD is defined, then we cause all objects to be recompiled. -.PHONY: force_rebuild -force_rebuild: - -ifneq "$(REBUILD)" "" - # the target below needs the blank rule that it has for this to work. - $(FIRST_TARGETS) $(ACTUAL_OBJECTS:%=$(OBJECT_DIR)/%) $(ACTUAL_TARGETS) $(LAST_TARGETS): force_rebuild -endif - -############################################################################ - diff --git a/scripts/clam/dotnet/variables.def b/scripts/clam/dotnet/variables.def deleted file mode 100644 index 8068feb2..00000000 --- a/scripts/clam/dotnet/variables.def +++ /dev/null @@ -1,514 +0,0 @@ -############################################################################### - -# CLAM System default variable definitions for C# compilation. - -############################################################################### - -# Pull in the base support for CLAM. -include variables.def - -############################################################################### - -CLAM_BIN = $(CLAM_DIR)/../bin - -############################################################################### - -ifneq "$(BUILD_PARAMETER_FILE)" "" - # define our version of the build parameter file. this should be set - # beforehand so we override the default parameter file for clam. - export PARAMETER_FILE = $(BUILD_PARAMETER_FILE) -###no: $(FEISTY_MEOW_DIR)/build/identity.ini -endif -ifeq "$(PARAMETER_FILE)" "" - # last ditch attempt to get one that will work. - export PARAMETER_FILE = $(FEISTY_MEOW_DIR)/build.ini -endif - -############################################################################### - -# BASE_CPU is a flag that distinguishes the type of processor, if necessary. -export BASE_CPU -#BASE_CPU = m68k - # motorola 68000 series. -#BASE_CPU = m68340 - # motorola 68340. -#BASE_CPU = x86 - # intel x86. -#BASE_CPU = ppc860 - # power pc 860. - -# set the CPU default if we do not have one. -ifeq "$(BASE_CPU)" "" - BASE_CPU = x86 -endif - -# COMPILER is a flag that specifies the operating system or the compiler for -# use in conditional compilation (#ifdef ... #endif) of the compiler dependent -# interfaces or implementations. -export COMPILER -#COMPILER = VISUAL_CPP - -# choose a default compiler if none was specified. -ifeq "$(COMPILER)" "" - COMPILER = VISUAL_CPP -endif - -# COMPILER_VERSION specifies the version of a particular compiler, if this is -# needed to distinguish how the code is built. -export COMPILER_VERSION - -############################################################################### - -# "TYPE" is the kind of product being generated by this project. this is -# used to decide where to put the final products of compilation. this is a -# variable in the user's makefile. -# Valid Types: -# TYPE = library (outputs are static or dynamic libraries) -# TYPE = application (outputs are main-line executables) -# TYPE = test (outputs are test programs) -export TYPE - -############################################################################### - -# pseudo-boolean variable section. if these have any value at all, then they -# are treated as being true. note that these are flags that should generally -# be passed on the command line to a make. if they are intended to be used -# from inside a makefile, then they must appear before this file is included. - -# "REBUILD" causes a rebuild of all source files if it's true. -export REBUILD - -# "DEBUG" is used to specify a debugging build. the default is for this to -# be false, which causes a release build. -export DEBUG - -# "OPTIMIZE" creates optimized code. -export OPTIMIZE - -# "NO_COMPILE" just runs through the targets without compiling. it still -# promotes headers however. -export NO_COMPILE - -# "BUILD_LIST_FILE" is the set of files that need to be recompiled for -# visual c++. -export BUILD_LIST_FILE = $(CLAM_TMP)/clam_rebuild.$(PROJECT) - -# "BUILD_WHACK_FILE" is the set of object files that should be removed if -# a build failure occurs. -export BUILD_WHACK_FILE = $(CLAM_TMP)/clam_whack.$(PROJECT) - -# we're adding the build list to the flag files so we know it gets cleaned up. -FLAG_FILES += $(BUILD_LIST_FILE) $(BUILD_WHACK_FILE) - -############################################################################### - -# This section implements the HOOPLE directory scheme. If your scheme differs, -# then you'll want to modify these appropriately. - -# "THIRD_PARTY_DIR" is the root of our support libraries. -ifeq "$(OP_SYSTEM)" "UNIX" - export THIRD_PARTY_DIR -endif -ifeq "$(OP_SYSTEM)" "WIN32" - export THIRD_PARTY_DIR = $(FEISTY_MEOW_DIR)/3rdparty -endif - -# "OUTPUT_ROOT" is the root of all output directories for objects and other -# products being built. -export OUTPUT_ROOT = $(TARGETS_DIR)/obj - -# "PLATFORM_ADD_IN" is an option discriminator for the intended execution -# platform. it should end in an underscore if it is provided. -#PLATFORM_ADD_IN = linux_ -#PLATFORM_ADD_IN = w32_ -PLATFORM_ADD_IN = - -# "CPU_BUILD_DIR" distinguishes object directories by including the cpu -# name and the type of build. -ifneq "$(DEBUG)" "" - CPU_BUILD_DIR = $(BASE_CPU)_dbg -else - CPU_BUILD_DIR = $(BASE_CPU)_$(PLATFORM_ADD_IN)rel -endif - -# "BASE_OUTPUT_PATH" is the parent directory of objects for this type of -# cpu and this type of build. -export BASE_OUTPUT_PATH = $(OUTPUT_ROOT)/$(CPU_BUILD_DIR) - -# "OUTPUT_PATH" is the directory to generate all compiled products into. -export OUTPUT_PATH = $(BASE_OUTPUT_PATH)/$(PROJECT) - -# "OBJECT_DIR" is where object files will be stored during compilation for the -# target type being produced. -export OBJECT_DIR = $(OUTPUT_PATH) - -# These specify where files are to be created or located for our local build. -export EXECUTABLE_DIR = $(TARGETS_DIR)/exe -export DYNAMIC_LIBRARY_DIR = $(TARGETS_DIR)/dll -export STATIC_LIBRARY_DIR = $(TARGETS_DIR)/lib -export TESTS_DIR = $(TARGETS_DIR)/tests - -# "HEADER_SEARCH_PATH" is where the class interface files are to be found. -#HEADER_SEARCH_PATH = - -# "HOOPLE_HEADERS" are locations where the HOOPLE headers can be found. -HOOPLE_HEADERS := $(shell $(FIND) $(FEISTY_MEOW_DIR)/source/lib_src $(FEISTY_MEOW_DIR)/libraries -mindepth 1 -maxdepth 1 -type d) - -# "LOCAL_HEADERS" are overrides that go first in the header search path. -#LOCAL_HEADERS = - -# "CODEBASE_HEADERS" is a list that can be changed for a particular codebase. -# it is guaranteed that clam will not interfere with this list, whereas -# the LOCAL_HEADERS can be modified by clam. -#CODEBASE_HEADERS = - -# "LOCAL_LIBRARIES" are overrides that go first in the library search path. -#LOCAL_LIBRARIES = - -# "LIBRARY_SEARCH_PATH" is where the library files are to be found. -#LIBRARY_SEARCH_PATH = - -# "HOOPLE_LIBRARIES" is where our local libraries are located. -HOOPLE_LIBRARIES = - -# "EXTRA_COPIES" is a list of files that are copied to a project's output -# directory. -export EXTRA_COPIES - -# "EXTRA_VERSIONS" is a list of version files to synchronize with the main -# library version for this build. if a file called "version.ini" exists in -# the project directory, then it will automatically be upgraded, so the -# extra version files are mainly useful when you have a project with multiple -# programs in it and you want them to have independent version files (as you -# should perhaps want). -export EXTRA_VERSIONS - -# "OMIT_VERSIONS" is another exclusion flag. this one turns off the creation -# of version resource files and eliminates any references that would include -# such files. this is needed when rebuilding version_stamper. -#OMIT_VERSIONS = t - -# Add the obligatory junk to be cleaned up. Individual compiler sections -# should customize this by adding their object output directories. -CLEANUPS += $(ACTUAL_TARGETS) $(OUTPUT_PATH) -#hmmm: import libs for dynamic libraries on ms-win32 don't currently get -# cleaned up nicely. - -############################################################################### - -# "SEARCH_DIRS" is a list of directories that should be searched for both C++ -# header files and for C++ code libraries. The items placed in SEARCH_DIRS -# are fed into both the LIBRARY_SEARCH_PATH and the HEADER_SEARCH_PATH. -#SEARCH_DIRS = - -# "DEFINITIONS" is a list of compiler flags that define the value of c macros. -# These usually have the format of -D, but in this variable, only the -# itself should be listed because the compiler option -D is added -# automatically. -DEFINITIONS = CLAM_BUILT - -ifneq "$(BOOT_STRAPPING)" "" - # the software is being built from the ground up, including the binaries - # we use for building (like value_tagger and others). - DEFINITIONS += BOOT_STRAPPING -endif - -# "UNDEFINITIONS" is a list of macros to undefine. -#UNDEFINITIONS = - -#hmmm: these kinds of defines (with a value) do not work for csharp. -# GLOBAL_PRODUCT_NAME is an important variable for tagging the entire code base -# with some branding. It is provided as a macro definition to all source -# files. The initial value for the macro should come from the build init -# file, but if it doesn't, we pick a default. -##ifeq "$(product_name)" "" -## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"HOOPLE\\\" -##else -## DEFINITIONS += GLOBAL_PRODUCT_NAME=\\\"$(product_name)\\\" -##endif - -# *_PRODUCT_VERSION records parts of our version numbers for the code to see. -###DEFINITIONS += MAJOR_PRODUCT_VERSION=$(major) MINOR_PRODUCT_VERSION=$(minor) - -# "DEBUG_FLAGS" these flags are used for generating specialized versions of -# object files, such as ones that include debugging code or that add code for -# profiling. -# Possible values are -g for adding GDB debugging code and -pg for adding -# gprof profiling code. -#DEBUG_FLAGS = -g -#DEBUG_FLAGS = -pg -#DEBUG_FLAGS = - -# "COMPILER_FLAGS" are the flags for the pre-processor and compiler. -#COMPILER_FLAGS = - -# "STRICT_WARNINGS" turns on all warnings and forces them to be considered -# as errors when encountered. -#STRICT_WARNINGS = - -# "LIBRARIAN_FLAGS" are flags that need to be passed to the library tool -# that creates static code libraries. -#LIBRARIAN_FLAGS = - -# "SOURCE" is the list of files that are turned into objects. -#SOURCE = - -# "LIBS_USED" are system or compiler code libraries that the targets to be -# created depend upon. -#LIBS_USED = - -# "LOCAL_LIBS_USED" is very similar to the LIBS_USED, but these libraries -# actually cause executables and object files to be recompiled when the -# libraries specified have changed. To accomplish this, these libraries MUST -# be located in the STATIC_LIBRARY_DIR rather than at some arbitrary place -# on the LIBRARY_SEARCH_PATH. -#LOCAL_LIBS_USED = - -# Load flags tell the linker and loader how to deal with the files and where -# to locate library components. The prefix goes before object files are -# listed, and the suffix after. The prefix should have things like the -# directories to be searched for code libraries (although they should be added -# to LIBRARY_SEARCH_PATH) and the loading mode for functions (static/dynamic). -# In the suffix, actual library loading statements (like -lmath) can be -# included (although they should be listed in a different form in LIBS_USED). -# Remember that the unix loader looks for functions in libraries in a bizarre -# way: ld searches for a function only when it has already been asked for it. -# This means that it doesn't remember what functions it has already been -# provided with in the libraries and object files, and it will fail if those -# functions are only asked for after they have already been encountered. -#LOAD_FLAG_PREFIX = -#LOAD_FLAG_SUFFIX = - -# The prefix used on library names, mostly for unix. -LIB_PREFIX = -# The standard suffix for static or import libraries on this operating system. -LIB_ENDING = - -# Flag for specifying the library name to create. -#CREATE_LIBRARY_FLAG = - -# Flag for specifying a library to include in linking. -LIBRARY_NAME_FLAG = -l - -# Flag for specifying a directory to add to the search path for libs. -#LIBRARY_PATH_FLAG = -L - -# Flag for specifying the name of an output from the linker. -#LINKER_OUTPUT_FLAG = - -# Flag for separating linker options from compilation options for a combined -# compiler / linker. -#LINKER_OPTION_SEPARATOR = - -# Flag that passes special options when building executable programs. It is -# passed just before the LOAD_FLAG_PREFIX. -#EXE_FLAGS = - -# The name of the compiler tool. -#CC = - -# The name of the library creator tool. -#LIBRARY_TOOL = - -# the root name of the version file. This is currently irrelevant on -# non-win32 platforms. -VERSION_RC_ROOT = $(shell $(SHELL) $(CLAM_DIR)/cpp/rc_name.sh) - # we import the rc_name from our close ally, the c++ compiler definitions. - -############################################################################### - -# Compiler Dependent Flags -# -# "COMPILER_ROOT_DIR" is the top-level for the C++ compiler location. -# "COMPILER_HEADER_DIR" is where the compiler's headers are. -export COMPILER_HEADER_DIR -# "COMPILER_LIBRARY_DIR" is where archived libraries are. -# "CC" is the name of the C++ compiler to be used. - -ifeq "$(COMPILER)" "VISUAL_CPP" - # microsoft visual studio 7. - - LIB_ENDING = .dll - PLATFORM_ADD_IN = w32_ - - # these define special characteristics for a program being built. - # BASE is almost always defined and pulls in fundamental w32 support. - # RPC supplies the remote procedure call libraries. - # OLE pulls in object linking and embedding support. - # SECURITY links with the w32 security APIs. - # CLR sets options that are appropriate for managed code. - VCPP_USE_BASE=true - VCPP_USE_RPC= - VCPP_USE_OLE= - VCPP_USE_SECURITY= - VCPP_USE_CLR= - VCPP_VISTA_ICON= - - # the framework dir points at the .net framework to be used for compilation. - ifeq "$(FRAMEWORK_VERSION)" "" - - # older .net 1.1. -# SHORT_FRAMEWORK_VERSION = 1.1 -# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).4322 - - # old .net 2.0. -# SHORT_FRAMEWORK_VERSION = 2.0 -# FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION).50727 - - # current .net 3.5. - SHORT_FRAMEWORK_VERSION = 3.5 - FRAMEWORK_VERSION = $(SHORT_FRAMEWORK_VERSION) - - endif - export FRAMEWORK_DIR - ifeq "$(FRAMEWORK_DIR)" "" - FRAMEWORK_DIR = $(subst \,/,$(WINDIR))/Microsoft.NET/Framework/v$(FRAMEWORK_VERSION) - endif - - # pick a default compiler version for what we tend to use the most at the - # current time. - ifeq "$(COMPILER_VERSION)" "" - COMPILER_VERSION = 7 - endif -## DEFINITIONS += COMPILER_VERSION=$(COMPILER_VERSION) - # add a macro so programs can check what version is appropriate. - - # C# needs an entry point for exes. a different one can be specified also. - ENTRY_POINT = main - - # C# treats resources differently than simple code files. the list in this - # variable will be embedded in the target. - #RESX = - - # TLBEXPORT is a tool to create TLB files from DLL files. - TLBEXPORT = $(COMPILER_ROOT_DIR)/../SDK/v$(SHORT_FRAMEWORK_VERSION)/bin/tlbexp$(EXE_END) - - # calculate the visual studio root directory. - export VIS_STU_ROOT := $(shell $(SHELL) $(CLAM_DIR)/cpp/ms_root_dir.sh $(CLAM_BIN) ) - ifneq "$(VIS_STU_ROOT)" "" - COMPILER_ROOT_DIR = $(VIS_STU_ROOT)/vc# - endif - ifeq "$(COMPILER_ROOT_DIR)" "" - HOSEUP = $(shell echo The compiler directory is not set. Please define the environment ) - HOSEUP = $(shell echo variable VSxCOMNTOOLS to point at the folder where visual C++ is installed. ) - HOSEUP = - endif - - export COMPILER_VERSION = $(shell $(SHELL) $(CLAM_DIR)/cpp/get_version.sh $(COMPILER) $(COMPILER_ROOT_DIR) ) - - # set a variable for the resource compiler for old-style resources. - STANDARD_RC = $(VIS_STU_ROOT)/vc/bin/rc - - # set up a directory for debugging files to be stored. these are not - # moved with the postconditions--they are generated in place. - export PDB_DIR=$(TARGETS_DIR)/pdb - - # set these way up here so we can override them later. - CC = bash $(CLAM_DIR)/csharp/csharper.sh -##$(FRAMEWORK_DIR)/csc - -# LINK_TOOL = $(COMPILER_ROOT_DIR)/bin/link - - # vary the locations for compiler files based on the version. - COMPILER_HEADER_DIR = $(VIS_STU_ROOT)/vc/include $(VIS_STU_ROOT)/vc/atlmfc/include $(VIS_STU_ROOT)/vc/platformsdk/include - COMPILER_LIBRARY_DIR = -###$(COMPILER_ROOT_DIR)/lib $(COMPILER_ROOT_DIR)/atlmfc/lib $(COMPILER_ROOT_DIR)/platformsdk/lib - RC = $(COMPILER_ROOT_DIR)/../SDK/v2.0/bin/resgen$(EXE_END) - - ifeq "$(COMPILER_HEADER_DIR)" "" - HOSEUP = $(shell echo The compiler version is not set. Please define COMPILER_VERSION.) - endif - - DEFINITIONS += _Windows _WINDOWS WIN32 __WIN32__ __FLAT__ VC_EXTRALEAN WIN32_LEAN_AND_MEAN ATL_NO_LEAN_AND_MEAN _WIN32_WINNT=0x403 - DEF_FILE = - LIBRARY_TOOL = $(COMPILER_ROOT_DIR)/bin/lib - LOAD_FLAG_PREFIX = -nologo -#-subsystem:windows -machine:IX86 - LOAD_FLAG_SUFFIX = - - MIDL = midl -Oicf $(MIDL_DEFS) $(HEADER_SEARCH_PATH:%=-I% ) $(DEFINITIONS:%=-I% ) - MIDL_DEFS = -no_robust - - # set the flags used by visual c++. - CREATE_LIBRARY_FLAG = -out: - LIBRARY_NAME_FLAG = -reference: - LIBRARY_PATH_FLAG = -lib: - LINKER_OPTION_SEPARATOR = -link - LINKER_OUTPUT_FLAG = -out: - - # Add the extra files created by visual c++. -#is this needed now that we whack whole output path? CLEANUPS += $(OUTPUT_PATH)/*.*db - - # put the common flags into the compiler flags. - COMPILER_FLAGS += -nologo -#-Fd$(PDB_DIR)/$(PROJECT)_bookkeeping.pdb -GR -GX -W3 -Zi -EHsc -GS -Gd - - ifneq "$(DEBUG)" "" - # disable function inlining and optimizations for debug. -# COMPILER_FLAGS += -Ob0 -Od - else - # enable function inlining for release only. -# COMPILER_FLAGS += -Ob1 - - ifneq "$(OPTIMIZE)" "" - # add in fast code optimization. -#testing... -# COMPILER_FLAGS += -O2 -#trying O2 again although it seems to combust too easily. - else - # no optimizations. - endif - - endif - - # check if profiling is to be enabled. - PROFILER_FLAG = - ifneq "$(PROFILE)" "" - PROFILER_FLAG = -profile - endif - - # add the common linker flags. the debugging flag is added because we - # want to be able to debug into release code, but since the pdb files - # are separate, we're not exposing ourselves when we don't include them. - LOAD_FLAG_PREFIX += $(PROFILER_FLAG) -debug -#-warn:3 - - # "USE_MFC" dictates whether mfc should be allowed in the application. - # the default is not to use MFC extension style dlls. this can be turned - # on in the individual makefiles that require MFC. - #USE_MFC = - - # the library creator gets a couple of flags. - LIBRARIAN_FLAGS += -nologo -machine:IX86 - - # now, vary the flag configuration based on the flags that have been set. - - ifneq "$(CONSOLE_MODE)" "" - # console type of applications are built using the static flag so that - # they are more redistributable. - DEFINITIONS += _CONSOLE -### LOAD_FLAG_SUFFIX += -subsystem:console - STATIC = true - endif - - # dynamically linked library or application flags. - ifneq "$(DEBUG)" "" - # debug. - DEFINITIONS += _DEBUG -# COMPILER_FLAGS += -MDd - else - # release. - DEFINITIONS += NDEBUG -# COMPILER_FLAGS += -MD - endif - - ifneq "$(STRICT_WARNINGS)" "" -# COMPILER_FLAGS += -W3 -WX - # we have not turned on W4 because it is not really warnings for the - # microsoft compiler. instead, it is a bunch of blather about what the - # compiler intends to do rather than problems in the code. - endif - -endif - - diff --git a/scripts/clam/variables.def b/scripts/clam/variables.def index 6bf3d2ca..5778df51 100644 --- a/scripts/clam/variables.def +++ b/scripts/clam/variables.def @@ -79,8 +79,9 @@ ifeq "$(FEISTY_MEOW_SCRIPTS)" "" export FEISTY_MEOW_SCRIPTS := $(FEISTY_MEOW_DIR)/scripts endif -# "PRODUCTION_DIR" is where the built products will be stored, plus any -# temporary files that are generated during the build. +# "PRODUCTION_DIR" is where components required for building the code or +# installers can be found. +#hmmm: is this redundant? export PRODUCTION_DIR ifeq "$(PRODUCTION_DIR)" "" PRODUCTION_DIR=$(FEISTY_MEOW_DIR)/production @@ -104,9 +105,6 @@ ifeq "$(TARGETS_DIR)" "" TARGETS_DIR = $(FEISTY_MEOW_DIR) endif -# "CLAM_BIN" points at the location for helper binaries and shell scripts. -export CLAM_BIN = $(PRODUCTION_DIR)/clam_bin - # "CURRENT_DIR" is the directory where this make was started. export CURRENT_DIR := $(shell pwd) @@ -201,14 +199,15 @@ export CLEAN # sets the temporary directory. export CLAM_TMP ifeq "$(CLAM_TMP)" "" - CLAM_TMP := $(WASTE_DIR) + CLAM_TMP := $(GENERATED_DIR)/clam_tmp endif -ifeq "$(OP_SYSTEM)" "WIN32" - # set these so that compilers and such will use them. - export TMP := $(CLAM_TMP) - export TEMP := $(CLAM_TMP) -endif +#turned off for the moment, since this seems like a bad idea; we define clam tmp in terms of tmp sometimes, don't we??? +#ifeq "$(OP_SYSTEM)" "WIN32" +# # set these so that compilers and such will use them. +# export TMP := $(CLAM_TMP) +# export TEMP := $(CLAM_TMP) +#endif # "FAILURE_FILE" is a file that is used as a flag to track failures. if the # file exists, then it is assumed that a failure happened during the current diff --git a/scripts/core/create_tempdir.sh b/scripts/core/create_tempdir.sh index 76a6f08d..aca92ae7 100644 --- a/scripts/core/create_tempdir.sh +++ b/scripts/core/create_tempdir.sh @@ -7,13 +7,13 @@ if [ ! -z "$SHELL_DEBUG" ]; then echo creating temporary directory...; fi -source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" - if [ -z "$TMP" ]; then # main declaration of the transients area. export TMP=$HOME/.tmp fi +source "$FEISTY_MEOW_SCRIPTS/core/functions.sh" + LOG_FILE=$TMP/zz_transients.log # log file for this script. diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index 8c50f202..1da2546b 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -181,9 +181,8 @@ if [ -z "$NECHUNG" ]; then fi # now augment the environment if we found our build variables. if [ $found_build_vars == 1 ]; then - # the binary directory contains handy programs we use a lot. we set - # up the path to it here based on the operating system. - define_yeti_variable BINDIR=$FEISTY_MEOW_DIR/production/binaries + # the binary directory contains our collection of handy programs. + define_yeti_variable BINDIR=$TARGETS_DIR # add binaries created within build to the path. define_yeti_variable PATH="$(dos_to_unix_path $BINDIR):$PATH" # Shared libraries are located via this variable. diff --git a/scripts/generator/bootstrap_build.sh b/scripts/generator/bootstrap_build.sh index fba2df43..7a9e08c1 100644 --- a/scripts/generator/bootstrap_build.sh +++ b/scripts/generator/bootstrap_build.sh @@ -56,13 +56,13 @@ source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variabl function prepare_binaries_dir() { # we'll store binaries here from the bootstrap process. - if [ ! -d "$BINARY_DIR" ]; then - echo "creating binary dir now in $BINARY_DIR" - mkdir "$BINARY_DIR" + if [ ! -d "$CLAM_BINARY_DIR" ]; then + echo "creating binary dir now in $CLAM_BINARY_DIR" + mkdir "$CLAM_BINARY_DIR" fi - if [ ! -f "$BINARY_DIR/paths.ini" ]; then + if [ ! -f "$CLAM_BINARY_DIR/paths.ini" ]; then echo "copied paths.ini to binary dir." - cp "$PRODUCTION_DIR/paths.ini" "$BINARY_DIR" + cp "$PRODUCTION_DIR/paths.ini" "$CLAM_BINARY_DIR" fi } @@ -136,9 +136,9 @@ if [ "$OPERATING_SYSTEM" = "UNIX" ]; then echo "Failed to build the application $1--quitting now." exit 1892 fi - cp "$INTERMEDIATE_EXE_DIR/$1" "$BINARY_DIR/$1" - strip "$BINARY_DIR/$1" - chmod 755 "$BINARY_DIR/$1" + cp "$INTERMEDIATE_EXE_DIR/$1" "$CLAM_BINARY_DIR/$1" + strip "$CLAM_BINARY_DIR/$1" + chmod 755 "$CLAM_BINARY_DIR/$1" } elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then function promote { @@ -148,8 +148,8 @@ elif [ "$OPERATING_SYSTEM" = "WIN32" ]; then echo "Failed to build the application $1.exe--quitting now." exit 1892 fi - cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$BINARY_DIR" - chmod 755 "$BINARY_DIR/$1.exe" + cp "$INTERMEDIATE_EXE_DIR/$1.exe" "$CLAM_BINARY_DIR" + chmod 755 "$CLAM_BINARY_DIR/$1.exe" } else echo "The OPERATING_SYSTEM variable is unset or unknown. Bailing out." @@ -160,7 +160,7 @@ fi # start the actual build process now... -# recreate our useful waste directories and other things... +# load in the feisty meow building environment. source "$BUILD_SCRIPTS_DIR/build_variables.sh" "$BUILD_SCRIPTS_DIR/build_variables.sh" # clean out any current contents. @@ -173,7 +173,7 @@ toolset_names=(makedep value_tagger version_stamper vsts_version_fixer write_bui if [ -z "$SAVE_BINARIES" ]; then for i in ${toolset_names[*]}; do - whack_name="$BINARY_DIR/$i$EXE_ENDING" + whack_name="$CLAM_BINARY_DIR/$i$EXE_ENDING" #echo removing "$whack_name" rm -f "$whack_name" done @@ -186,7 +186,7 @@ chmod 755 "$CLAM_DIR"/cpp/*.sh # rebuild the dependency tool. needed by everything, pretty much, but # since it's from the xfree project, it doesn't need any of our libraries. -if [ ! -f "$BINARY_DIR/makedep$EXE_ENDING" ]; then +if [ ! -f "$CLAM_BINARY_DIR/makedep$EXE_ENDING" ]; then pushd "$TOOL_SOURCES/dependency_tool" &>/dev/null make_code pre_compilation NO_DEPS=t OMIT_VERSIONS=t make_code NO_DEPS=t OMIT_VERSIONS=t @@ -203,10 +203,10 @@ if [ ! -f "$BINARY_DIR/makedep$EXE_ENDING" ]; then fi # rebuild the version tools and other support apps. -if [ ! -f "$BINARY_DIR/value_tagger$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/version_stamper$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/vsts_version_fixer$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/write_build_config$EXE_ENDING" ]; then +if [ ! -f "$CLAM_BINARY_DIR/value_tagger$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/version_stamper$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/vsts_version_fixer$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/write_build_config$EXE_ENDING" ]; then pushd "$TOOL_SOURCES/clam_tools" &>/dev/null make_code pre_compilation OMIT_VERSIONS=t make_code OMIT_VERSIONS=t @@ -230,11 +230,11 @@ if [ ! -f "$BINARY_DIR/value_tagger$EXE_ENDING" \ fi # build a few other utilities. -if [ ! -f "$BINARY_DIR/short_path$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/sleep_ms$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/create_guid$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/zap_process$EXE_ENDING" \ - -o ! -f "$BINARY_DIR/playsound$EXE_ENDING" ]; then +if [ ! -f "$CLAM_BINARY_DIR/short_path$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/sleep_ms$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/create_guid$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/zap_process$EXE_ENDING" \ + -o ! -f "$CLAM_BINARY_DIR/playsound$EXE_ENDING" ]; then pushd "$TOOL_SOURCES/simple_utilities" &>/dev/null make_code pre_compilation OMIT_VERSIONS=t make_code OMIT_VERSIONS=t @@ -256,7 +256,7 @@ if [ -z "$JUST_BOOTSTRAP_APPS" ]; then bash "$BUILD_SCRIPTS_DIR/whack_build.sh" clean # recreate our useful junk directories... - mkdir -p "$WASTE_DIR" + mkdir -p "$GENERATED_DIR" mkdir -p "$TEMPORARIES_DIR" mkdir -p "$LOGS_DIR" diff --git a/scripts/generator/build_variables.sh b/scripts/generator/build_variables.sh index 9281730f..182dd8de 100644 --- a/scripts/generator/build_variables.sh +++ b/scripts/generator/build_variables.sh @@ -97,13 +97,30 @@ fi # in the building hierarchy. export BUILD_TOP="$FEISTY_MEOW_DIR" -# this variable points at a folder where we store most of the generated products -# of the build. these tend to be the things that will be used for packaging into -# different types of products. +# the production directory is the location for all the scripts and setup +# code needed to produce the executables for feisty meow. export PRODUCTION_DIR="$BUILD_TOP/production" +# set up the top-level for all build creations and logs and such. +export GENERATED_DIR="$TMP/generated-feisty_meow" +if [ ! -d "$GENERATED_DIR" ]; then + mkdir -p "$GENERATED_DIR" +fi +# set up our effluent outsourcing valves. +export TEMPORARIES_DIR="$GENERATED_DIR/temporaries" +if [ ! -d "$TEMPORARIES_DIR" ]; then + mkdir -p "$TEMPORARIES_DIR" +fi + +# this variable points at a folder where we store the generated products of +# the build, such as the binaries and installer packages. +export RUNTIME_DIR="$GENERATED_DIR/runtime" +if [ ! -d "$RUNTIME_DIR" ]; then + mkdir -p "$RUNTIME_DIR" +fi + # we define a log file storage area that can be relied on by the build. -export LOGS_DIR="$PRODUCTION_DIR/logs" +export LOGS_DIR="$GENERATED_DIR/logs" if [ ! -d "$LOGS_DIR" ]; then mkdir -p "$LOGS_DIR" fi @@ -161,23 +178,15 @@ fi if [ -z "$got_bad" ]; then # where we store the binaries used for building the rest of the code base. - export BINARY_DIR="$PRODUCTION_DIR/clam_bin" + export CLAM_BINARY_DIR="$RUNTIME_DIR/clam_bin" # the final destination for the new binaries which provide the hoople # build with all the apps it needs to get going. - export TARGETS_DIR="$PRODUCTION_DIR/binaries" + export TARGETS_DIR="$RUNTIME_DIR/binaries" # targets directory is meaningful to clam, which will use it for output. export INTERMEDIATE_EXE_DIR="$TARGETS_DIR" # where we are building the apps before they get promoted. - export WASTE_DIR="$PRODUCTION_DIR/waste" - if [ ! -d "$WASTE_DIR" ]; then - mkdir -p "$WASTE_DIR" - fi - export TEMPORARIES_DIR="$WASTE_DIR/temporaries" - if [ ! -d "$TEMPORARIES_DIR" ]; then - mkdir -p "$TEMPORARIES_DIR" - fi - +#hmmm: could allow override on this if already set. # calculate which build ini file to use. export BUILD_PARAMETER_FILE="$PRODUCTION_DIR/feisty_meow_config.ini" if [ ! -f "$BUILD_PARAMETER_FILE" ]; then @@ -193,7 +202,7 @@ if [ -z "$got_bad" ]; then # we should have established our internal variables now, so let's try # using them. - export PATH=$(dos_to_unix_path $BINARY_DIR):$PATH + export PATH=$(dos_to_unix_path $CLAM_BINARY_DIR):$PATH # load up the helper variables for visual studio on winders. if [ "$OPERATING_SYSTEM" == "WIN32" ]; then diff --git a/scripts/generator/vis_stu_vars.sh b/scripts/generator/vis_stu_vars.sh index 1fe1a438..2ab5ba08 100644 --- a/scripts/generator/vis_stu_vars.sh +++ b/scripts/generator/vis_stu_vars.sh @@ -99,19 +99,6 @@ function setup_visual_studio_variables() # the redirection of stderr to null is to get around an obnoxious cygwin # warning that seems to be erroneously complaining about backslashes. - # convert all other relevant paths back to dos form, or visual studio barfs. - #export BUILD_SCRIPTS_DIR=$(unix_to_dos_path $BUILD_SCRIPTS_DIR) - #export BUILDING_HIERARCHY=$(unix_to_dos_path $BUILDING_HIERARCHY) - #export BUILDER_DIR=$(unix_to_dos_path $BUILDER_DIR) - #export BUILD_TOP=$(unix_to_dos_path $BUILD_TOP) - #export PRODUCTION_DIR=$(unix_to_dos_path $PRODUCTION_DIR) - #export LOGS_DIR=$(unix_to_dos_path $LOGS_DIR) - #export TOOL_SOURCES=$(unix_to_dos_path $TOOL_SOURCES) - #export BINARY_DIR=$(unix_to_dos_path $BINARY_DIR) - #export TARGETS_DIR=$(unix_to_dos_path $TARGETS_DIR) - #export INTERMEDIATE_EXE_DIR=$(unix_to_dos_path $INTERMEDIATE_EXE_DIR) - #export WASTE_DIR=$(unix_to_dos_path $WASTE_DIR) - ############## echo "calculated variables for dos/windoze builds:" diff --git a/scripts/generator/whack_build.sh b/scripts/generator/whack_build.sh index 0647b0ab..95e203d1 100644 --- a/scripts/generator/whack_build.sh +++ b/scripts/generator/whack_build.sh @@ -20,7 +20,8 @@ function whack_single_build_area() exit 3 fi - export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")" +#old export NEW_TMP="$(mktemp -d "$CLEANING_LOCALE/TEMPS.XXXXXX")" + export NEW_TMP="$(mktemp -d "$TMP/temps-build-whacking.XXXXXX")" export CRUDFILE="$(mktemp "$NEW_TMP/whack_build.XXXXXX")" echo "" &>"$CRUDFILE" @@ -30,7 +31,8 @@ function whack_single_build_area() # avoid accidentally removing way too much important stuff if our variables have not # been previously established. - local WASTE_DIR="$CLEANING_TOP/waste" + local GENERATED_DIR="$CLEANING_TOP/generated-feisty_meow" +#*** hmmm: above is wrong place now! local TEMPORARIES_DIR="$CLEANING_TOP/temporaries" # kerzap. @@ -41,7 +43,7 @@ function whack_single_build_area() "$CLEANING_TOP/logs" \ "$CLEANING_TOP/objects" \ "$TEMPORARIES_DIR" \ - "$WASTE_DIR" \ + "$GENERATED_DIR" \ "$CLEANING_TOP/__build_"*.h \ "$CLEANING_TOP/manifest.txt"