--- trunk/OOPSE-2.0/make/Makefile.in 2005/03/22 16:38:37 2131 +++ trunk/OOPSE-2.0/make/Makefile.in 2005/04/11 21:37:30 2164 @@ -59,6 +59,7 @@ Applications = \ applications/simpleBuilder\ applications/staticProps \ applications/dynamicProps \ + applications/nanoRodBuilder \ Samples = \ samples/argon \ @@ -204,7 +205,71 @@ OtherTargetFiles = $(OtherSourceFiles:%=$(Packag $(LexFiles:%.l= %.c) OtherTargetFiles = $(OtherSourceFiles:%=$(PackageTargetDir)/%) + +########################################################################### +# +# Figure out the names of the module files based on some work done by +# configure. The tr function below is from John Graham-Cumming +# (http://www.jgc.org). +# +# The tr function. Has three arguments: +# +# $1 The list of characters to translate from +# $2 The list of characters to translate to +# $3 The text to translate +# +# For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L. + +tr = $(eval __t := $3) \ + $(foreach c, \ + $(join $(addsuffix :,$1),$2), \ + $(eval __t := \ + $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \ + $(__t))))$(__t) + +# Common character classes for use with the tr function. Each of +# these is actually a variable declaration and must be wrapped with +# $() or ${} to be used. + +[A-Z] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z # +[a-z] := a b c d e f g h i j k l m n o p q r s t u v w x y z # +[0-9] := 0 1 2 3 4 5 6 7 8 9 # +[A-F] := A B C D E F # + +# Figure out whether we have $(eval) or not (GNU Make 3.80 and above) +# if we do not then we need to use the shell version of tr, and not the +# faster tr function above: + +__have_eval := $(false) +__ignore := $(eval __have_eval := $(true)) +ifndef __have_eval + uc = $(shell echo $1 | tr "a-z" "A-Z") + lc = $(shell echo $1 | tr "A-Z" "a-z") +else + uc = $(call tr,$([a-z]),$([A-Z]),$1) + lc = $(call tr,$([A-Z]),$([a-z]),$1) +endif + +# OK, now we can actually use these functions to figure out the names +# of the module files: + +ifneq "$(words $(Modules))" "0" +ifeq "$(ModuleCase)" "UPPER" + MODULES = $(call uc,$(Modules)) +else + ifeq "$(ModuleCase)" "lower" + MODULES = $(call lc,$(Modules)) + else + MODULES = $(Modules) + endif +endif + ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix)) + ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix)) +endif +# +########################################################################### + ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries)) ThirdPartyJars = $(subst $(Space),$(X),$(ThirdPartyJarsTmp)) @@ -621,7 +686,12 @@ endif $(JarFile) \ $(Executable) endif + +echo : $(PackageListLoop) + $(Print) Done echo. +_echoall : + $(Print) $(Modules) # make clean clean : $(PackageListLoop) @@ -630,7 +700,9 @@ _cleanall : _cleanall : $(Delete) \ $(ObjectFiles) \ + $(ModuleFiles) \ $(ParallelObjectFiles) \ + $(ParallelModuleFiles) \ $(JarFile) \ $(SharedLibrary) \ $(StaticLibrary) \