libEMCALbase depends on libRAWDatabase
[u/mrichter/AliRoot.git] / build / module.tpl
CommitLineData
117cfc60 1#-*- Mode: Makefile -*-
f0a26826 2
f347de98 3
f0a26826 4ifndef PACKFFLAGS
5@PACKAGE@FFLAGS:=$(FFLAGS)
6else
7@PACKAGE@FFLAGS:=$(PACKFFLAGS)
8endif
9
10ifndef PACKCFLAGS
11@PACKAGE@CFLAGS:=$(CFLAGS)
12else
13@PACKAGE@CFLAGS:=$(PACKCFLAGS)
14endif
15
16ifndef PACKCXXFLAGS
17@PACKAGE@CXXFLAGS:=$(CXXFLAGS)
18else
19@PACKAGE@CXXFLAGS:=$(PACKCXXFLAGS)
20endif
21
88cb7938 22ifndef PACKSOFLAGS
23@PACKAGE@SOFLAGS:=$(SOFLAGS)
24else
25@PACKAGE@SOFLAGS:=$(PACKSOFLAGS)
26endif
27
28ifdef DYEXT
29ifndef PACKDYFLAGS
30@PACKAGE@DYFLAGS:=$(DYFLAGS)
31else
32@PACKAGE@DYFLAGS:=$(PACKDYFLAGS)
33endif
34endif
35
651e35f1 36ifndef PACKLDFLAGS
37@PACKAGE@LDFLAGS:=$(LDFLAGS)
38else
39@PACKAGE@LDFLAGS:=$(PACKLDFLAGS)
40endif
41
810722e6 42ifndef PACKDCXXFLAGS
19ca05d1 43@PACKAGE@DCXXFLAGS:=$(CXXFLAGSNO)
810722e6 44else
117cfc60 45@PACKAGE@DCXXFLAGS:=$(PACKDCXXFLAGS)
810722e6 46endif
47
de6c7cfd 48ifndef PACKBLIBS
49@PACKAGE@BLIBS:=$(LIBS)
50else
51@PACKAGE@BLIBS:=$(PACKBLIBS)
52endif
53
216d9f87 54WITHDICT=
55ifneq ($(DHDR),)
f0a26826 56WITHDICT=YES
57else
216d9f87 58ifneq ($(CINTAUTOLINK),)
59WITHDICT=YES
60endif
f0a26826 61endif
62
f347de98 63# Headerfiles exported to common place:
64@PACKAGE@EXPORT:=$(EXPORT)
65@PACKAGE@EXPORTDEST:=$(patsubst %,$(EXPORTDIR)/%,$(EXPORT))
66
67
67fd7264 68#Extra include,libs, defines etc.
69
eb5bc777 70@PACKAGE@DEFINE:=$(EDEFINE) -D_MODULE_=\"@MODULE@\"
f347de98 71
72@PACKAGE@INC:=$(patsubst %,-I%,$(EINCLUDE)) -I@MODULE@
73
f0a26826 74@PACKAGE@ELIBS:=$(patsubst %,-l%,$(ELIBS))
87c71321 75@PACKAGE@ELIBSDEP:=$(patsubst %,lib/tgt_$(ALICE_TARGET)/lib%.$(SOEXT),$(ELIBS))
f0a26826 76@PACKAGE@ELIBSDIR:=$(patsubst %,-L%,$(ELIBSDIR))
77
78#c sources and headers
79
80@PACKAGE@CS:=$(patsubst %,$(MODDIR)/%,$(CSRCS))
81@PACKAGE@CH:=$(patsubst %,$(MODDIR)/%,$(CHDRS))
82
83#Fortran sources
84@PACKAGE@FS:=$(patsubst %,$(MODDIR)/%,$(FSRCS))
85
86#c++ sources and header
87@PACKAGE@S:=$(patsubst %,$(MODDIR)/%,$(SRCS))
f347de98 88@PACKAGE@H:=$(patsubst %,$(MODDIR)/%,$(HDRS)) $(EHDRS)
89
90#############################################################################
91#
92# If special rootcint headerfiles is specified use them
93# else use all headers
f0a26826 94
f347de98 95ifndef CINTHDRS
ce917c76 96@PACKAGE@CINTHDRS:=$(@PACKAGE@H)
f347de98 97else
216d9f87 98@PACKAGE@CINTHDRS:=$(CINTHDRS:%=@MODULE@/%)
2bf97326 99#@PACKAGE@CINTHDRS:=$(pathsubst %,@MODULE@/%,$(CINTHDRS))
f347de98 100endif
2bf97326 101@PACKAGE@CINTCLASSES:=$(patsubst %.h,%,$(notdir $(@PACKAGE@CINTHDRS)))
f347de98 102#############################################################################
f0a26826 103
104# Package Dictionary
216d9f87 105ifneq ($(DHDR),)
f0a26826 106@PACKAGE@DH:=$(MODDIR)/$(DHDR)
216d9f87 107else
108@PACKAGE@DH:=
109endif
110ifneq ($(CINTAUTOLINK),)
111@PACKAGE@DAL:=$(MODDIRO)/G__@PACKAGE@AutoLinkDef.h
112@PACKAGE@DH+=$(@PACKAGE@DAL)
113endif
f0a26826 114
f0a26826 115#All objects
521bebb4 116@PACKAGE@CXXO:=$(patsubst %,$(MODDIRO)/%, $(SRCS:.cxx=.o))
f0a26826 117@PACKAGE@CO:=$(patsubst %,$(MODDIRO)/%, $(CSRCS:.c=.o))
521bebb4 118@PACKAGE@SMALLFO:=$(patsubst %.f,$(MODDIRO)/%.o, $(filter %.f, $(FSRCS)))
119@PACKAGE@CAPITFO:=$(patsubst %.F,$(MODDIRO)/%.o, $(filter %.F, $(FSRCS)))
120@PACKAGE@FO:=$(@PACKAGE@SMALLFO) $(@PACKAGE@CAPITFO)
121@PACKAGE@O:= $(@PACKAGE@CXXO) $(@PACKAGE@FO) $(@PACKAGE@CO)
da1b5393 122@PACKAGE@CHV:=$(patsubst %,$(MODDIRC)/%, $(SRCS:.cxx=.viol))
0c7d35a6 123@PACKAGE@SML:=$(sort $(patsubst %,$(MODDIRZ)/%, $(filter $(SRCS:.cxx=.smell),$(HDRS:.h=.smell))))
f0a26826 124
d47d6108 125
f0a26826 126ifdef WITHDICT
127 @PACKAGE@DS:=$(MODDIRO)/G__@PACKAGE@.cxx
128 @PACKAGE@DO:=$(MODDIRO)/G__@PACKAGE@.o
129 @PACKAGE@DDEP:=$(@PACKAGE@DO:.o=.d)
130 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d) $(@PACKAGE@DDEP)
131else
132 @PACKAGE@DS:=
133 @PACKAGE@DO:=
134 @PACKAGE@DDEP:=
135 @PACKAGE@DEP:=$(@PACKAGE@O:.o=.d)
136endif
137
138
139#The actual library file
140
141@PACKAGE@LIB:=$(LIBPATH)/lib@PACKAGE@.$(SOEXT)
40c469d5 142
143ifneq ($(DYEXT),)
144@PACKAGE@DLIB:=$(LIBPATH)/lib@PACKAGE@.$(DYEXT)
145endif
146
2d8cad5a 147@PACKAGE@ALIB:=$(LIBPATH)/lib@PACKAGE@.$(AEXT)
f0a26826 148
d47d6108 149#Add this to the modules libs
bdbbbe90 150ifeq ($(TYPE),lib)
d47d6108 151@MODULE@LIBS += $(@PACKAGE@LIB)
2d8cad5a 152@MODULE@ALIBS += $(@PACKAGE@ALIB)
40c469d5 153ifneq ($(DYEXT),)
154@MODULE@DLIBS += $(@PACKAGE@DLIB)
155endif
bdbbbe90 156endif
d47d6108 157
f0a26826 158#The actual binary file
159
160@PACKAGE@BIN:=$(BINPATH)/@PACKAGE@
161
d47d6108 162#Add to modules list of binaries
163@MODULE@BINS += $(@PACKAGE@BIN)
f0a26826 164
f347de98 165# Use in the main Makefile
f0a26826 166
167ifeq ($(TYPE),lib)
168ALLLIBS += $(@PACKAGE@LIB)
2d8cad5a 169ALLALIBS += $(@PACKAGE@ALIB)
40c469d5 170ifneq ($(DYEXT),)
171ALLLIBS += $(@PACKAGE@DLIB)
172endif
f0a26826 173BINLIBS += -l@PACKAGE@
174else
175ALLEXECS += $(@PACKAGE@BIN)
176endif
177
40c469d5 178ifeq ($(DYEXT),)
179@PACKAGE@LIB := $(@PACKAGE@LIB)
180else
181@PACKAGE@LIB := $(@PACKAGE@LIB)
182endif
183
87c71321 184# include all dependence files
f0a26826 185INCLUDEFILES +=$(@PACKAGE@DEP)
186
f347de98 187EXPORTFILES += $(@PACKAGE@EXPORTDEST)
f0a26826 188
189#local rules
190
f347de98 191#The exportfiles only include if any!!
192
193ifdef @PACKAGE@EXPORT
896cb507 194#$(@PACKAGE@EXPORTDEST): $(patsubst %,@MODULE@/%,$(@PACKAGE@EXPORT))
195
196$(@PACKAGE@EXPORTDEST): $(EXPORTDIR)/%.h: @MODULE@/%.h
15142e2f 197ifndef ALIQUIET
ba419e66 198 @echo "***** Copying file $^ to $@ *****"
15142e2f 199endif
53f2641c 200 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
ba419e66 201 @cp $^ $@
f347de98 202endif
203
88cb7938 204#------------------------------------------------------------------------
205
796dbee6 206ifneq (,$(findstring macosx,$(ALICE_TARGET)))
f3564e28 207$(@PACKAGE@LIB): $(@PACKAGE@DLIB) $(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
208ifndef ALIQUIET
209 @echo "***** Linking library $@ *****"
210endif
211 $(MUTE)rm -f $@; cd $(dir $@); ln -s $(notdir $(@PACKAGE@DLIB)) $(notdir $@)
212else
f0a26826 213$(@PACKAGE@LIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
15142e2f 214ifndef ALIQUIET
f0a26826 215 @echo "***** Linking library $@ *****"
15142e2f 216endif
ede06f63 217 \rm -f "$(CURDIR)"/$@ ;\
da6c43d5 218 cd $(@MODULE@DIRO) ;\
ede06f63 219 $(SHLD) $(@PACKAGE@SOFLAGS) -o "$(CURDIR)"/$@ $(patsubst $(@MODULE@DIRO)/%,%,$(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(SHLIB);\
220 chmod a-w "$(CURDIR)"/$@ ;\
da6c43d5 221 cd $(ALICE_ROOT)
f3564e28 222endif
810722e6 223
40c469d5 224ifneq ($(DYEXT),)
225$(@PACKAGE@DLIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
226ifndef ALIQUIET
227 @echo "***** Linking library $@ *****"
228endif
ede06f63 229 \rm -f "$(CURDIR)"/$@ ;\
da6c43d5 230 cd $(@MODULE@DIRO) ;\
ede06f63 231 $(DYLD) $(@PACKAGE@DYFLAGS) -o "$(CURDIR)"/$@ $(patsubst $(@MODULE@DIRO)/%,%,$(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(DYLIB);\
232 chmod a-w "$(CURDIR)"/$@ ;\
da6c43d5 233 cd $(ALICE_ROOT)
40c469d5 234endif
235
88cb7938 236#------------------------------------------------------------------------
237
2d8cad5a 238$(@PACKAGE@ALIB):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
239ifndef ALIQUIET
240 @echo "***** Linking static library $@ *****"
241endif
ede06f63 242 \rm -f "$(CURDIR)"/$@ ;\
da6c43d5 243 cd $(@MODULE@DIRO) ;\
ede06f63 244 $(ALLD) $(ALFLAGS) "$(CURDIR)"/$@ $(patsubst $(@MODULE@DIRO)/%,%,$(@PACKAGE@O) $(@PACKAGE@DO)) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(ALLIB);\
da6c43d5 245 cd $(ALICE_ROOT)
2d8cad5a 246
247
2603dcc4 248$(@PACKAGE@BIN):$(@PACKAGE@O) $(@PACKAGE@DO) @MODULE@/module.mk
15142e2f 249ifndef ALIQUIET
250 @echo "***** Making executable $@ *****"
251endif
2d8cad5a 252ifeq ($(ALIPROFILE),YES)
de6c7cfd 253 $(MUTE)$(LD) $(@PACKAGE@LDFLAGS) $(@PACKAGE@O) $(ARLIBS) $(SHLIBS) $(@PACKAGE@BLIBS) $(EXEFLAGS) -o $@
2d8cad5a 254else
de6c7cfd 255 $(MUTE)$(LD) $(@PACKAGE@LDFLAGS) $(@PACKAGE@O) $(@PACKAGE@DO) $(BINLIBDIRS) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@ELIBS) $(@PACKAGE@BLIBS) $(EXEFLAGS) -o $@
2d8cad5a 256endif
f0a26826 257
8e02a1b8 258$(@PACKAGE@DAL): $(@PACKAGE@CINTHDRS) @MODULE@/module.mk
216d9f87 259ifndef ALIQUIET
260 @echo "***** Creating $@ *****";
261endif
2bf97326 262 $(MUTE)echo '//automatically generated ROOT DICT definition' > $@
263 $(MUTE)echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
216d9f87 264 $(MUTE)echo '#ifdef __CINT__' >> $@
265 $(MUTE)echo '#pragma link off all globals;' >> $@
266 $(MUTE)echo '#pragma link off all classes;' >> $@
267 $(MUTE)echo '#pragma link off all functions;' >> $@
2bf97326 268 $(MUTE)$(foreach i, $(@PACKAGE@CINTCLASSES), \
59e05d49 269 echo "#pragma link C++ class $(i)+;" >> $@ ;)
216d9f87 270 $(MUTE)echo '#endif' >> $@
271
8e02a1b8 272$(@PACKAGE@DS): $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH) @MODULE@/module.mk
15142e2f 273ifndef ALIQUIET
ce917c76 274 @echo "***** Creating $@ *****";
15142e2f 275endif
f0a26826 276 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
043a26ce 277 @\rm -f $(patsubst %.cxx,%.d, $@)
ce917c76 278 $(MUTE)rootcint -f $@ -c $(@PACKAGE@DEFINE) $(CINTFLAGS) $(@PACKAGE@INC) $(@PACKAGE@CINTHDRS) $(@PACKAGE@DH)
f0a26826 279
62b5f6a4 280$(@PACKAGE@DO): $(@PACKAGE@DS)
15142e2f 281ifndef ALIQUIET
282 @echo "***** Compiling $< *****";
283endif
117cfc60 284 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) -I$(ALICE_ROOT) $< -o $@ $(@PACKAGE@DCXXFLAGS)
f0a26826 285
de6c7cfd 286
f0a26826 287#Different targets for the module
288
5edd655b 289ifeq ($(TYPE),lib)
50ad3bbd 290all-@MODULE@: $(@PACKAGE@LIB)
40c469d5 291ifneq ($(DYEXT),)
50ad3bbd 292all-@MODULE@: $(@PACKAGE@DLIB)
40c469d5 293endif
5edd655b 294else
50ad3bbd 295all-@MODULE@: $(@PACKAGE@BIN)
5edd655b 296endif
297
50ad3bbd 298
f0a26826 299depend-@PACKAGE@: $(@PACKAGE@DEP)
300
301# determination of object files
521bebb4 302$(@PACKAGE@CXXO): $(MODDIRO)/%.o: $(MODDIR)/%.cxx $(MODDIRO)/%.d
15142e2f 303ifndef ALIQUIET
304 @echo "***** Compiling $< *****";
305endif
f0a26826 306 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
67fd7264 307 $(MUTE)$(CXX) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CXXFLAGS)
f0a26826 308
521bebb4 309$(@PACKAGE@CAPITFO): $(MODDIRO)/%.o: $(MODDIR)/%.F $(MODDIRO)/%.d
15142e2f 310ifndef ALIQUIET
311 @echo "***** Compiling $< *****";
312endif
f0a26826 313 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
15142e2f 314 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
f0a26826 315
521bebb4 316$(@PACKAGE@SMALLFO): $(MODDIRO)/%.o: $(MODDIR)/%.f $(MODDIRO)/%.d
15142e2f 317ifndef ALIQUIET
318 @echo "***** Compiling $< *****";
319endif
f0a26826 320 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
15142e2f 321 $(MUTE)$(F77) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@FFLAGS)
f0a26826 322
521bebb4 323$(@PACKAGE@CO): $(MODDIRO)/%.o: $(MODDIR)/%.c $(MODDIRO)/%.d
15142e2f 324ifndef ALIQUIET
325 @echo "***** Compiling $< *****";
326endif
f0a26826 327 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
67fd7264 328 $(MUTE)$(CC) $(@PACKAGE@DEFINE) -c $(@PACKAGE@INC) $< -o $@ $(@PACKAGE@CFLAGS)
f0a26826 329
330$(@PACKAGE@DDEP): $(@PACKAGE@DS)
15142e2f 331ifndef ALIQUIET
87c71321 332 @echo "***** Making dependences for $< *****";
15142e2f 333endif
f0a26826 334 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
335 @share/alibtool depend "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
336
521bebb4 337$(@PACKAGE@CXXO:.o=.d): $(MODDIRO)/%.d: $(MODDIRS)/%.cxx
15142e2f 338ifndef ALIQUIET
87c71321 339 @echo "***** Making dependences for $< *****";
15142e2f 340endif
f0a26826 341 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
67fd7264 342 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
521bebb4 343
344$(@PACKAGE@SMALLFO:.o=.d): $(MODDIRO)/%.d: $(MODDIRS)/%.f
15142e2f 345ifndef ALIQUIET
87c71321 346 @echo "***** Making dependences for $< *****";
15142e2f 347endif
f0a26826 348 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
896cb507 349 @share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
521bebb4 350
351$(@PACKAGE@CAPITFO:.o=.d): $(MODDIRO)/%.d: $(MODDIRS)/%.F
15142e2f 352ifndef ALIQUIET
87c71321 353 @echo "***** Making dependences for $< *****";
15142e2f 354endif
f0a26826 355 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
15142e2f 356 $(MUTE)share/alibtool dependF "$(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
521bebb4 357
358$(@PACKAGE@CO:.o=.d): $(MODDIRO)/%.d: $(MODDIRS)/%.c
15142e2f 359ifndef ALIQUIET
87c71321 360 @echo "***** Making dependences for $< *****";
15142e2f 361endif
f0a26826 362 @(if [ ! -d '$(dir $@)' ]; then echo "***** Making directory $(dir $@) *****"; mkdir -p $(dir $@); fi;)
67fd7264 363 @share/alibtool depend "$(@PACKAGE@DEFINE) $(@PACKAGE@ELIBSDIR) $(@PACKAGE@INC) $(DEPINC) $<" > $@
b9d0a01d 364
bdfb9593 365.PRECIOUS: $(patsubst %.cxx,$(MODDIRO)/%.d,$(SRCS))
366.PRECIOUS: $(patsubst %.c,$(MODDIRO)/%.d,$(CSRCS))
367.PRECIOUS: $(patsubst %.F,$(MODDIRO)/%.d,$(patsubst %.f,$(MODDIRO)/%.d,$(FSRCS)))
814cac0f 368
da1b5393 369check-@MODULE@: $(@PACKAGE@CHV)
b9d0a01d 370
371# IRST coding rule check
da1b5393 372$(@PACKAGE@CHV:.viol=.i): $(MODDIRC)/%.i: $(MODDIR)/%.cxx $(MODDIRO)/%.d
b9d0a01d 373 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
f684a380 374 $(MUTE)$(CXX) -E $(@PACKAGE@DEFINE) $(@PACKAGE@INC) -I. $< > $@ $(@PACKAGE@CXXFLAGS)
b9d0a01d 375 @cd $(dir $@) ; $(IRST_INSTALLDIR)/patch/patch4alice.prl $(notdir $@)
376
377# IRST coding rule check
da1b5393 378$(@PACKAGE@CHV): $(MODDIRC)/%.viol: $(MODDIRC)/%.i
8faf5ae4 379 $(MUTE)echo $@ ; $(CODE_CHECK) $< $(shell echo $(dir $<) | sed -e 's:/check::') > $@
b9d0a01d 380
da1b5393 381.SECONDARY: $(@PACKAGE@CHV:.viol=.i) $(@PACKAGE@CHI:.viol=.ii)
71aa2819 382
da1b5393 383PACKREVENG += $(@PACKAGE@CHV:.viol=.ii)
b9d0a01d 384
118c0ae6 385# IRST code smell checker
386
da1b5393 387smell-@MODULE@: $(@PACKAGE@SML)
118c0ae6 388
da1b5393 389$(@PACKAGE@SML:.smell=_cxx.ml) : $(MODDIRZ)/%_cxx.ml : $(MODDIR)/%.cxx
84cdca4c 390 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
391 $(MUTE)src2srcml $< $@
392
da1b5393 393$(@PACKAGE@SML:.smell=_h.ml) : $(MODDIRZ)/%_h.ml : $(MODDIR)/%.h
118c0ae6 394 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
84cdca4c 395 $(MUTE)src2srcml $< $@
396
da1b5393 397$(@PACKAGE@SML) : $(MODDIRZ)/%.smell : $(MODDIRZ)/%_cxx.ml $(MODDIRZ)/%_h.ml
84cdca4c 398 $(MUTE)echo smelling $@
50ad3bbd 399 $(MUTE)java -classpath $(SMELL_DETECTOR_DIR):$(SMELL_DETECTOR_DIR)/xom-1.1.jar -Xmx500m SmellDetector $^ > $@
fe0beaf5 400 $(MUTE)[ -s $@ ] || touch $@
118c0ae6 401
da1b5393 402.SECONDARY: $(@PACKAGE@SML:.smell=_cxx.ml) $(@PACKAGE@SML:.smell=_h.ml)
118c0ae6 403
ce917c76 404# targets to create .par archives (jgrosseo)
08ae61b3 405@PACKAGE@.par: $(patsubst %,@MODULE@/@PACKAGE@/%,$(filter-out dict.%, $(HDRS) $(SRCS) $(DHDR) $(PKGFILE) $(FSRCS) Makefile Makefile.arch lib@PACKAGE@.pkg PROOF-INF))
ce917c76 406 @echo "Creating archive" $@ ...
bb937a04 407 @cd @MODULE@; (tar cfzh ../$@ @PACKAGE@ 2> /dev/null && echo "package" $@ "created in" $(PWD)/$@) || (tar cfzh /tmp/$@ @PACKAGE@ 2> /dev/null && echo "package" $@ "created in /tmp/"$@)
ce917c76 408 @rm -rf @MODULE@/@PACKAGE@
ce917c76 409
410@MODULE@/@PACKAGE@/Makefile: @MODULE@/Makefile
411 @echo Copying $< to $@ with transformations
412 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
3b2d7a6f 413 @sed 's/include \$$(ROOTSYS)\/test\/Makefile.arch/include Makefile.arch/; s/PACKAGE = .*/PACKAGE = @PACKAGE@/' < $^ > $@
ce917c76 414
415@MODULE@/@PACKAGE@/Makefile.arch: $(ROOTSYS)/test/Makefile.arch
416 @echo Copying $< to $@
417 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
c8a60375 418 @cp -pR $^ $@
ce917c76 419
420@MODULE@/@PACKAGE@/PROOF-INF: @MODULE@/PROOF-INF.@PACKAGE@
421 @echo Copying $< to $@
422 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
c8a60375 423 @cp -pR $^ $@
ce917c76 424
425@MODULE@/@PACKAGE@/%: @MODULE@/%
426 @echo Copying $< to $@
427 @[ -d $(dir $@) ] || mkdir -p $(dir $@)
c8a60375 428 @cp -pR $< $@
ce917c76 429
430test-@PACKAGE@.par: @PACKAGE@.par
431 @echo "INFO: The file $< is now tested, in case of an error check in par-tmp/@PACKAGE@."
432 @mkdir -p par-tmp
ded0ad79 433 @cd par-tmp; tar xfz /tmp/$<; cd $(subst .par,,$<); PROOF-INF/BUILD.sh
ce917c76 434 @rm -rf par-tmp/@PACKAGE@
435 @echo "INFO: Testing succeeded (already cleaned up)"