]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - build/module.tpl
Port of changes from v4-07-Release and additional rule conformance
[u/mrichter/AliRoot.git] / build / module.tpl
index f519e37058b21c638b1c929d34c5c89303cfec6e..61e030f3ac7bee66a507e6a110c2d663e0617cf2 100644 (file)
@@ -120,8 +120,7 @@ endif
 @PACKAGE@FO:=$(@PACKAGE@SMALLFO) $(@PACKAGE@CAPITFO)
 @PACKAGE@O:= $(@PACKAGE@CXXO) $(@PACKAGE@FO) $(@PACKAGE@CO)
 @PACKAGE@CHV:=$(patsubst %,$(MODDIRC)/%, $(SRCS:.cxx=.viol))
-@PACKAGE@SML:=$(patsubst %,$(MODDIRZ)/%, $(SRCS:.cxx=.smell))
-
+@PACKAGE@SML:=$(sort $(patsubst %,$(MODDIRZ)/%, $(filter $(SRCS:.cxx=.smell),$(HDRS:.h=.smell))))
 
 
 ifdef WITHDICT
@@ -304,14 +303,15 @@ $(MODDIRO)/@PACKAGE@_srcslist: @MODULE@/@TYPE@@PACKAGE@.pkg
 #Different targets for the module
 
 ifeq ($(TYPE),lib)
-all-@PACKAGE@: $(@PACKAGE@LIB)
+all-@MODULE@: $(@PACKAGE@LIB)
 ifneq ($(DYEXT),)
-all-@PACKAGE@: $(@PACKAGE@DLIB)
+all-@MODULE@: $(@PACKAGE@DLIB)
 endif
 else
-all-@PACKAGE@: $(@PACKAGE@BIN)
+all-@MODULE@: $(@PACKAGE@BIN)
 endif
 
+
 depend-@PACKAGE@: $(@PACKAGE@DEP)
 
 # determination of object files
@@ -412,7 +412,8 @@ $(@PACKAGE@SML:.smell=_h.ml) : $(MODDIRZ)/%_h.ml : $(MODDIR)/%.h
 
 $(@PACKAGE@SML) : $(MODDIRZ)/%.smell : $(MODDIRZ)/%_cxx.ml $(MODDIRZ)/%_h.ml
        $(MUTE)echo smelling $@
-       $(MUTE)java -classpath $(SMELL_DETECTOR_DIR):$(SMELL_DETECTOR_DIR)/xom-1.1.jar -Xmx500m SmellDetector $? > $@
+       $(MUTE)java -classpath $(SMELL_DETECTOR_DIR):$(SMELL_DETECTOR_DIR)/xom-1.1.jar -Xmx500m SmellDetector $^ > $@
+       $(MUTE)[ -s $@ ] || touch $@
 
 .SECONDARY: $(@PACKAGE@SML:.smell=_cxx.ml) $(@PACKAGE@SML:.smell=_h.ml)