may have fixed annoying make clean bugs
[feisty_meow.git] / scripts / clam / variables.def
index 96f4f91f3989b381495e67a326eeda94e9cb64c0..6acd205616d969ea95c8b3a26b2aeab7b880ca7b 100644 (file)
@@ -61,22 +61,39 @@ endif
 
 ###############################################################################
 
-# "REPOSITORY_DIR" is the root of the "build" for our compilation oriented
+# "FEISTY_MEOW_APEX" is the root of the "build" for our compilation oriented
 # features.  All source code and build helper files are usually found there.
 # The build targets to be built are usually stored there also, although the
 # targets can be located elsewhere if desired.  see TARGETS_DIR below.
-export REPOSITORY_DIR
-ifeq "$(REPOSITORY_DIR)" ""
-#  REPOSITORY_DIR = 
+export FEISTY_MEOW_APEX
+ifeq "$(FEISTY_MEOW_APEX)" ""
+#  FEISTY_MEOW_APEX = 
 #uhhh, use the current location?
+#currently we rely on this being set from shell bootstrapping.  is that bad?
+endif
+
+# "FEISTY_MEOW_SCRIPTS" is the root location of our scripts.  we expect to
+# be able to find a few things there reliably.
+export FEISTY_MEOW_SCRIPTS
+ifeq "$(FEISTY_MEOW_SCRIPTS)" ""
+  export FEISTY_MEOW_SCRIPTS := $(FEISTY_MEOW_APEX)/scripts
+endif
+
+# "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_APEX)/production
 endif
 
 # "CLAM_DIR" points at where the CLAM source files are located.  this is needed
 # for finding shell scripts used during compilation.  if you are not using the
 # standard CLAM location, then modify this appropriately.
 export CLAM_DIR
-# must be set externally!
-#export CLAM_DIR := $(FEISTY_MEOW_SCRIPTS)/clam
+ifeq "$(CLAM_DIR)" ""
+  export CLAM_DIR := $(FEISTY_MEOW_SCRIPTS)/clam
+endif
 
 # "TARGETS_DIR" is where all generated files will end up.  Usually the
 # files are put in a subdirectory named after their file type, such as
@@ -85,12 +102,9 @@ export TARGETS_DIR
 ifeq "$(TARGETS_DIR)" ""
   # the default is to generate files into subdirectories that are at the
   # top-level of the repository.
-  TARGETS_DIR = $(REPOSITORY_DIR)
+  TARGETS_DIR = $(FEISTY_MEOW_APEX)
 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)
 
@@ -139,6 +153,8 @@ ACTUAL_LAST_TARGETS = $(LAST_TARGETS)
 
 # "RUN_TARGETS" is a list of programs that should be executed as part of a make.
 export RUN_TARGETS
+# "RUN_ALL_TESTS" turns on execution of the RUN_TARGETS.
+export RUN_ALL_TESTS
 
 # "MAKEFILE_NAME" works with BUILD_BEFORE and BUILD_AFTER.  This allows
 # the name of the makefile in the subdirectory to be changed to something other
@@ -151,9 +167,6 @@ export MAKEFILE_NAME = makefile
 # find command.  on dosdows, the find command is utter garbage and we need
 # to make sure we don't accidentally run that inferior one.
 export FIND = find
-#ifeq "$(OP_SYSTEM)" "WIN32"
-#  export FIND = $(REPOSITORY_DIR)/msys/bin/find
-#endif
 
 # "PARAMETER_FILE" is the location of our version stamps (if defined) and
 # also contains any extra flags passed to the compilation.
@@ -174,26 +187,32 @@ include $(PARAMETER_FILE)
 
 ############################################################################
 
-# "CLEAN" is an powerful flag that affects what clam does.  if the flag is
+# "CLEAN" is a powerful flag that affects what clam does.  if the flag is
 # non-empty, then nothing will be built and every generated file that is
-# known about will be deleted.
+# known about will be deleted.  it is intended as exported, since then sub-
+# shells know that they are cleaning and we do not have to pass them a
+# target.
+#hmmm: (although we do?)
 export CLEAN
 # "CLEANUPS" are things to be removed by the "make clean" command.
-#CLEANUPS =
+undefine CLEANUPS
 # OTHER_CLEANS are targets to execute before performing the main clean up.
-#OTHER_CLEANS =
+# we intentionally reset this here to avoid a polluted variable getting
+# to us from a previous make.
+undefine OTHER_CLEANS
 
 # 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