MUTE:=@
endif
+CLEAN=$(findstring clean,$(patsubst %clean%,clean,$(MAKECMDGOALS)))
+
#-------------------------------------------------------------------------------
# IRST coding rule check
#-------------------------------------------------------------------------------
# default target
-default:
- $(MAKE) aliroot
-
+default: aliroot
#-------------------------------------------------------------------------------
# Each module will add to these macros
#-------------------------------------------------------------------------------
# Check if module.mk is present for the library
-%.mk: build/module.tpl
+%.mk: build/module.tpl build/header.tpl build/clean.tpl share/alibtool
ifndef ALIQUIET
@echo "***** Creating $@ file *****";
endif
@share/alibtool mkmodule $(patsubst %/module.mk,%,$@) > $@;
-#-------------------------------------------------------------------------------
-# If cleaning, do not include dependencies or module.mk files.
-
-ifeq ($(findstring $(MAKECMDGOALS), clean distclean clean-all clean-dicts \
-clean-modules clean-depend clean-objects clean-libs clean-bins \
-clean-check-all),)
-
#-------------------------------------------------------------------------------
# If making modules, not not include anything
-ifneq ($(findstring modules,$(MAKECMDGOALS)),modules)
+ifeq ($(findstring modules,$(MAKECMDGOALS)),)
#-------------------------------------------------------------------------------
# Include the modules
-include $(patsubst %,%/module.mk,$(MODULES))
+#-------------------------------------------------------------------------------
+# If cleaning, do not include dependencies or module.mk files.
+
+ifeq ($(CLEAN),)
+
#-------------------------------------------------------------------------------
# Include dependencies if not making them!
alilibs: $(LIBPATH) modules $(ALLLIBS)
endif
-aliroot: $(BINPATH) $(ALLEXECS) alilibs
+aliroot: alilibs $(BINPATH) $(ALLEXECS)
#-------------------------------------------------------------------------------
# Single Makefile "distribution": Makefile + modules + mkdepend scripts