2 # CLAM System default variable definitions.
4 ###############################################################################
6 # This file contains definitions and descriptions of the variables used
7 # in the CLAM system (Coordinated Library Automagic Make). This defaults
8 # file should be included near the start of the user makefile, and then the
9 # rules file should be included after the user has modified the appropriate
10 # variables and added the appropriate rules and targets.
12 ###############################################################################
14 ## # OPERATING_SYSTEM is a flag that specifies the operating system under which
15 ## # the makefile system is executing.
16 ## export OPERATING_SYSTEM
17 ## #OPERATING_SYSTEM := UNIX = unix | OS2 = ibm os/2 | SYSV = v unix | DOS = pc dos
18 ## # | WIN32 = ms-win32 / NT.
20 ## # CLAM_OS_SUBCLASS is a finer differentiation of the OPERATING_SYSTEM. currently only
21 ## # the darwin subclass for unix is considered.
22 ## export CLAM_OS_SUBCLASS
23 ## #CLAM_OS_SUBCLASS := darwin |
25 ## # set the default operating system when none is specified.
26 ## ifeq "$(OPERATING_SYSTEM)" ""
27 ## #is there a nice way to join the greps?
28 ## CLAM_ON_UNIX := $(shell uname | grep -i linux)
29 ## ifeq "$(CLAM_ON_UNIX)" ""
30 ## CLAM_ON_UNIX := $(shell uname | grep -i unix)
31 ## ifeq "$(CLAM_ON_UNIX)" ""
32 ## CLAM_ON_UNIX := $(shell uname | grep -i darwin)
33 ## ifneq "$(CLAM_ON_UNIX)" ""
34 ## # pick the subclass now that we know this is darwin.
35 ## CLAM_OS_SUBCLASS := darwin
39 ## CLAM_ON_DOS := $(shell uname | grep -i cygwin)
40 ## ifeq "$(CLAM_ON_DOS)" ""
41 ## CLAM_ON_DOS := $(shell uname | grep -i ming)
43 ## ifneq "$(CLAM_ON_UNIX)" ""
44 ## OPERATING_SYSTEM := UNIX
46 ## ifneq "$(CLAM_ON_DOS)" ""
47 ## OPERATING_SYSTEM := WIN32
49 ## # we do not have other comparisons yet, so we will assume unix. fix this
50 ## # if it is not your default operating system.
51 ## OPERATING_SYSTEM := UNIX
56 ## # now set a special ending for EXE files, which differs between the OSes.
58 ## ifeq "$(OPERATING_SYSTEM)" "WIN32"
62 ###############################################################################
64 # "FEISTY_MEOW_APEX" is the root of the "build" for our compilation oriented
65 # features. All source code and build helper files are usually found there.
66 # The build targets to be built are usually stored there also, although the
67 # targets can be located elsewhere if desired. see TARGETS_STORE below.
68 export FEISTY_MEOW_APEX
69 ifeq "$(FEISTY_MEOW_APEX)" ""
71 #uhhh, use the current location?
72 #currently we rely on this being set from shell bootstrapping. is that bad?
75 # "FEISTY_MEOW_SCRIPTS" is the root location of our scripts. we expect to
76 # be able to find a few things there reliably.
77 export FEISTY_MEOW_SCRIPTS
78 ifeq "$(FEISTY_MEOW_SCRIPTS)" ""
79 export FEISTY_MEOW_SCRIPTS := $(FEISTY_MEOW_APEX)/scripts
82 # "PRODUCTION_STORE" is where components required for building the code or
83 # installers can be found.
84 #hmmm: is this redundant?
85 export PRODUCTION_STORE
86 ifeq "$(PRODUCTION_STORE)" ""
87 PRODUCTION_STORE=$(FEISTY_MEOW_APEX)/production
90 # "CLAM_SCRIPTS" points at where the CLAM source files are located. this is needed
91 # for finding shell scripts used during compilation. if you are not using the
92 # standard CLAM location, then modify this appropriately.
94 ifeq "$(CLAM_SCRIPTS)" ""
95 export CLAM_SCRIPTS := $(FEISTY_MEOW_SCRIPTS)/clam
98 # "TARGETS_STORE" is where all generated files will end up. Usually the
99 # files are put in a subdirectory named after their file type, such as
100 # "include". These subdirectories will all live under the TARGETS_STORE.
102 ifeq "$(TARGETS_STORE)" ""
103 # the default is to generate files into subdirectories that are at the
104 # top-level of the repository.
105 TARGETS_STORE = $(FEISTY_MEOW_APEX)
108 # "CURRENT_DIR" is the directory where this make was started.
109 export CURRENT_DIR := $(shell pwd)
111 ###############################################################################
113 # "PROJECT" is the root name for the project being compiled. It is used
114 # in generated directory names and for other purposes of uniquification.
115 # This is a variable that _must_ be supplied by the user makefile.
118 # PROJECT = test_parser
121 # "TARGETS" are the files to be created by CLAM. It is assumed that each
122 # target listed has a corresponding rule that causes it to be processed.
123 # Targets are automatically deleted when the "make clean" command is used.
126 # "ACTUAL_TARGETS" is how the targets are expected to be passed to the rules
127 # file. This allows rules from a plug-in module to manipulate the TARGETS to
128 # make sure that important files do not get deleted by the automatic deletion
129 # done with "make clean." If the real module used does not create a variable
130 # called ACTUAL_TARGETS from the TARGETS, then the default specified here is
132 export ACTUAL_TARGETS = $(TARGETS)
134 # "FIRST_TARGETS" and "LAST_TARGETS" are targets that need to be processed
135 # before and after the "TARGETS".
139 # "ACTUAL_FIRST_TARGETS" is the real variable that should be passed to the
140 # rules for reasons similar to ACTUAL_TARGETS above. Some language
141 # dependent modules need to modify the first targets by inserting targets
142 # before those provided by the user. "ACTUAL_LAST_TARGETS" is similar.
143 ACTUAL_FIRST_TARGETS = $(FIRST_TARGETS)
144 ACTUAL_LAST_TARGETS = $(LAST_TARGETS)
146 # "BUILD_BEFORE" is a list of projects that need to be created before this
147 # project can be created. The projects are expected to match subdirectories
148 # below this project. make will change to that subdirectory and run the
149 # makefile contained therein.
152 # "BUILD_AFTER" is similar to BUILD_BEFORE, but these are done after the rest.
155 # "RUN_TARGETS" is a list of programs that should be executed as part of a make.
157 # "RUN_ALL_TESTS" turns on execution of the RUN_TARGETS.
160 # "MAKEFILE_NAME" works with BUILD_BEFORE and BUILD_AFTER. This allows
161 # the name of the makefile in the subdirectory to be changed to something other
162 # than simply "makefile".
163 export MAKEFILE_NAME = makefile
165 ############################################################################
167 # "FIND" is a macro that points to the real find command, which is the unix
168 # find command. on dosdows, the find command is utter garbage and we need
169 # to make sure we do not accidentally run that inferior one.
172 # "PARAMETER_FILE" is the location of our version stamps (if defined) and
173 # also contains any extra flags passed to the compilation.
174 ifeq "$(PARAMETER_FILE)" ""
175 # the default assumes that clam lives under the main hoople branch.
176 export PARAMETER_FILE = $(CLAM_SCRIPTS)/clam_parms.ini
179 # ensure that our version variables are available to sub-shells.
184 export TRIPART_VERSION = .$(major).$(minor).$(revision)
186 # now pull those build parameters in.
187 include $(PARAMETER_FILE)
189 ############################################################################
191 # "CLEAN" is a powerful flag that affects what clam does. if the flag is
192 # non-empty, then nothing new will be built.
194 # "CLEANUPS" are things to be removed by the "make clean" command.
196 # OTHER_CLEANS are targets to execute before performing the main clean up.
199 # sets the temporary directory.
201 ifeq "$(CLAM_TMP)" ""
202 CLAM_TMP := $(FEISTY_MEOW_GENERATED_STORE)/clam_tmp
205 # "FAILURE_FILE" is a file that is used as a flag to track failures. if the
206 # file exists, then it is assumed that a failure happened during the current
208 export FAILURE_FILE = $(CLAM_TMP)/clam_failure.$(PROJECT)
210 # "DIRTY_FILE" is a file that signifies that some targets have been remade.
211 # it is not used at the base level of clam, but language-specific versions
212 # might do something special if targets were remade.
213 export DIRTY_FILE = $(CLAM_TMP)/clam_acted.$(PROJECT)
215 # "SUBMAKE_FLAG" is a file whose presence indicates that the submake performed
216 # some actions. that can be interpreted by some language-specific versions
217 # as a reason to set the dirty flag.
218 export SUBMAKE_FLAG = $(CLAM_TMP)/clam_submake.$(PROJECT)
220 # "FLAG_FILES" is a list of all the files that are used for compilation flags.
221 # they are whacked at the beginning and end of a make.
222 export FLAG_FILES = $(FAILURE_FILE) $(DIRTY_FILE)
224 # "SUB_FLAG_FILES" is a list of the compilation flag files which should be
225 # destroyed only at the end of a make. they are communication back
226 # from sub-makefiles.
227 export SUB_FLAG_FILES = $(SUBMAKE_FLAG)
229 # "SHELL" is used by gnu make to specify the shell that executes programs.
232 # "SH" is the shell that will execute all commands. this is our own variable;
233 # it is not used by gnu make. currently we just default to the standard
234 # SHELL variable above.
237 # "HIDER" cloaks the commands that are sent to the operating system. The
238 # HIDER macro has the "@" symbol in it if the make is _not_ verbose; this
239 # hides the commands that are executed. If the make _is_ to be verbose,
240 # then the "@" is removed.
243 # If the special NOISY flag is true, then the make will be _very_ verbose.
246 # Put together the full hider package.
247 HIDER = $(HIDER_CHAR)
249 # "HIDESH" is a hider that executes a sub-shell. This is needed for proper
250 # execution of inlined shell scripting. Note that the space at the end of
251 # the line is required.
252 HIDESH = $(HIDER) $(SH)
254 # "CATCHER" is a hider that looks for errors in the command being run and
255 # stops the make if any are seen.
256 CATCHER = $(HIDESH) $(CLAM_SCRIPTS)/badness_catcher.sh
258 # "NOISY" causes the compilation to be verbose. All commands issued are echoed
259 # to the standard output.
262 # "QUIET" has the effect of silencing certain internal clam printouts.
265 # "CLAM_ERROR_SOUND" causes the named file to be played for error conditions that
267 export CLAM_ERROR_SOUND
269 # "CLAM_FINISH_SOUND" causes the file specified to be played when the make is
271 export CLAM_FINISH_SOUND