ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-2.0/make/Makefile.in
(Generate patch)

Comparing trunk/OOPSE-2.0/make/Makefile.in (file contents):
Revision 2126 by gezelter, Mon Mar 21 19:22:55 2005 UTC vs.
Revision 2159 by gezelter, Mon Apr 11 19:49:43 2005 UTC

# Line 205 | Line 205 | ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLib
205  
206   OtherTargetFiles       = $(OtherSourceFiles:%=$(PackageTargetDir)/%)
207  
208 + ###########################################################################
209 + #
210 + # Figure out the names of the module files based on some work done by
211 + # configure.  The tr function below is from John Graham-Cumming
212 + # (http://www.jgc.org).
213 + #
214 + # The tr function.   Has three arguments:
215 + #
216 + # $1   The list of characters to translate from
217 + # $2   The list of characters to translate to
218 + # $3   The text to translate
219 + #
220 + # For example, $(call tr,A B C,1 2 3,CAPITAL) becomes 21PIT1L.
221 +
222 + tr = $(eval __t := $3)                                                    \
223 +     $(foreach c,                                                         \
224 +         $(join $(addsuffix :,$1),$2),                                    \
225 +         $(eval __t :=                                                    \
226 +             $(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)), \
227 +                 $(__t))))$(__t)
228 +
229 + # Common character classes for use with the tr function.  Each of
230 + # these is actually a variable declaration and must be wrapped with
231 + # $() or ${} to be used.
232 +
233 + [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 #
234 + [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 #
235 + [0-9] := 0 1 2 3 4 5 6 7 8 9 #
236 + [A-F] := A B C D E F #
237 +
238 + # Figure out whether we have $(eval) or not (GNU Make 3.80 and above)
239 + # if we do not then we need to use the shell version of tr, and not the
240 + # faster tr function above:
241 +
242 + __have_eval := $(false)
243 + __ignore := $(eval __have_eval := $(true))
244 +
245 + ifndef __have_eval
246 +  uc = $(shell echo $1 | tr "a-z" "A-Z")
247 +  lc = $(shell echo $1 | tr "A-Z" "a-z")
248 + else
249 +  uc = $(call tr,$([a-z]),$([A-Z]),$1)
250 +  lc = $(call tr,$([A-Z]),$([a-z]),$1)
251 + endif
252 +
253 + # OK, now we can actually use these functions to figure out the names
254 + # of the module files:
255 +
256 + ifneq "$(words $(Modules))" "0"
257 + ifeq "$(ModuleCase)" "UPPER"
258 +  MODULES = $(call uc,$(Modules))
259 + else
260 +  ifeq "$(ModuleCase)" "lower"
261 +    MODULES = $(call lc,$(Modules))
262 +  else
263 +    MODULES = $(Modules)
264 +  endif
265 + endif
266 +  ModuleFiles = $(MODULES:%= $(PackageTargetDir)/%.$(ModSuffix))
267 +  ParallelModuleFiles = $(MODULES:%= $(PackageParallelTargetDir)/%.$(ModSuffix))
268 + endif
269 + #
270 + ###########################################################################
271 +
272   ThirdPartyJarsTmp = $(patsubst %,$(LibDir)/%,$(JavaLibraries))
273   ThirdPartyJars    = $(subst $(Space),$(X),$(ThirdPartyJarsTmp))
274  
# Line 218 | Line 282 | ifneq  "$(words $(ObjectFiles) $(ParallelObjectFiles))
282    DependencyFile    = $(PackageSourceDir)/Makedepend
283    ifneq "$(words $(Main))" "0"
284      Executable             = $(BinDir)/$(Main)
285 <    ParallelExecutable     = $(BinDir)/$(Main)_MPI
285 >    ifeq "$(BuiltParallelExe)" "1"
286 >      ParallelExecutable     = $(BinDir)/$(Main)_MPI
287 >    endif
288    else
289      SharedLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.so
290      StaticLibrary          = $(LibDir)/lib$(subst /,,$(patsubst %,oopse_%,$(Package)))_UP.a
# Line 619 | Line 685 | endif
685          $(JarFile) \
686          $(Executable)
687   endif
688 +
689 + echo : $(PackageListLoop)
690 +        $(Print) Done echo.
691  
692 + _echoall :
693 +        $(Print) $(Modules)
694  
695   # make clean
696   clean : $(PackageListLoop)
# Line 628 | Line 699 | _cleanall :
699   _cleanall :
700          $(Delete) \
701                  $(ObjectFiles) \
702 +                $(ModuleFiles) \
703                  $(ParallelObjectFiles) \
704 +                $(ParallelModuleFiles) \
705                  $(JarFile) \
706                  $(SharedLibrary) \
707                  $(StaticLibrary) \

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines