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