From 102061cab065f647954f3e935f11f433e2f088d4 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 30 Nov 2015 23:23:30 -0500 Subject: [PATCH] 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. --- building.txt | 2 +- doc/clam_manual/clam_docs.html | 5 +- doc/feisty_meow_dox.config | 2 +- .../applications/bundler/bundle_creator.cpp | 2 +- .../utilities/time_running_app.cpp | 2 +- nucleus/makefile | 14 +++--- production/assign_bases/whack_odd_dlls.sh | 2 +- production/codescan.ini | 2 +- .../setup_src/bundle_example/create_bundle.sh | 6 +-- .../bundle_example/example_manifest.txt | 2 +- .../create_whole_build_pack.sh | 6 +-- .../setup_src/whole_build_package/makefile | 4 +- .../whole_build_manifest.txt | 16 +++---- scripts/bookmarks/create_marks.sh | 8 ++-- scripts/cgi/prepare_cgi_bin_for_apache.sh | 2 +- scripts/clam/cpp/preconditions.sh | 2 +- scripts/clam/cpp/rules.def | 6 +-- scripts/clam/cpp/variables.def | 4 +- .../{dotnet => dotnet-retired}/csharper.sh | 0 .../postconditions.sh | 0 .../preconditions.sh | 2 +- .../{dotnet => dotnet-retired}/readme.txt | 0 .../clam/{dotnet => dotnet-retired}/rules.def | 2 +- .../{dotnet => dotnet-retired}/variables.def | 4 +- scripts/clam/variables.def | 21 ++++----- scripts/core/create_tempdir.sh | 4 +- scripts/core/variables.sh | 5 +- scripts/generator/bootstrap_build.sh | 46 +++++++++---------- scripts/generator/build_variables.sh | 41 ++++++++++------- scripts/generator/vis_stu_vars.sh | 13 ------ scripts/generator/whack_build.sh | 8 ++-- 31 files changed, 114 insertions(+), 119 deletions(-) rename scripts/clam/{dotnet => dotnet-retired}/csharper.sh (100%) rename scripts/clam/{dotnet => dotnet-retired}/postconditions.sh (100%) rename scripts/clam/{dotnet => dotnet-retired}/preconditions.sh (94%) rename scripts/clam/{dotnet => dotnet-retired}/readme.txt (100%) rename scripts/clam/{dotnet => dotnet-retired}/rules.def (99%) rename scripts/clam/{dotnet => dotnet-retired}/variables.def (99%) 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/csharper.sh b/scripts/clam/dotnet-retired/csharper.sh similarity index 100% rename from scripts/clam/dotnet/csharper.sh rename to scripts/clam/dotnet-retired/csharper.sh diff --git a/scripts/clam/dotnet/postconditions.sh b/scripts/clam/dotnet-retired/postconditions.sh similarity index 100% rename from scripts/clam/dotnet/postconditions.sh rename to scripts/clam/dotnet-retired/postconditions.sh diff --git a/scripts/clam/dotnet/preconditions.sh b/scripts/clam/dotnet-retired/preconditions.sh similarity index 94% rename from scripts/clam/dotnet/preconditions.sh rename to scripts/clam/dotnet-retired/preconditions.sh index 2fe3e79b..4ed64fe8 100644 --- a/scripts/clam/dotnet/preconditions.sh +++ b/scripts/clam/dotnet-retired/preconditions.sh @@ -26,7 +26,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; done + 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. diff --git a/scripts/clam/dotnet/readme.txt b/scripts/clam/dotnet-retired/readme.txt similarity index 100% rename from scripts/clam/dotnet/readme.txt rename to scripts/clam/dotnet-retired/readme.txt diff --git a/scripts/clam/dotnet/rules.def b/scripts/clam/dotnet-retired/rules.def similarity index 99% rename from scripts/clam/dotnet/rules.def rename to scripts/clam/dotnet-retired/rules.def index 60af3689..c58d1d99 100644 --- a/scripts/clam/dotnet/rules.def +++ b/scripts/clam/dotnet-retired/rules.def @@ -207,7 +207,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 diff --git a/scripts/clam/dotnet/variables.def b/scripts/clam/dotnet-retired/variables.def similarity index 99% rename from scripts/clam/dotnet/variables.def rename to scripts/clam/dotnet-retired/variables.def index 8068feb2..94fcccf5 100644 --- a/scripts/clam/dotnet/variables.def +++ b/scripts/clam/dotnet-retired/variables.def @@ -9,7 +9,7 @@ include variables.def ############################################################################### -CLAM_BIN = $(CLAM_DIR)/../bin +#CLAM_BINARY_DIR = $(CLAM_DIR)/../bin ############################################################################### @@ -384,7 +384,7 @@ ifeq "$(COMPILER)" "VISUAL_CPP" 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) ) + 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 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" -- 2.34.1