Skip to content

Commit

Permalink
adding clean-*-lib targets to delete libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Jul 8, 2016
1 parent b212511 commit d13591d
Show file tree
Hide file tree
Showing 14 changed files with 90 additions and 35 deletions.
2 changes: 2 additions & 0 deletions README
Expand Up @@ -377,6 +377,8 @@ remove model-specific files:

$ make clean-<model>-dep # deletes .d files

$ make clean-<model>-lib # deletes library

$ make clean-<model>-obj # deletes .o files

$ make clean-<model>-src # deletes generated files
15 changes: 11 additions & 4 deletions addons/GM2Calc/module.mk
Expand Up @@ -68,23 +68,30 @@ LIBGM2Calc := \

LIBGM2Calc_INSTALL_DIR := $(INSTALL_DIR)/$(DIR)

.PHONY: clean-$(MODNAME) clean-$(MODNAME)-dep clean-$(MODNAME)-obj \
distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME): $(LIBGM2Calc) $(EXEGM2Calc_EXE)
@true

clean-$(MODNAME)-dep:
-rm -f $(LIBGM2Calc_DEP)
-rm -f $(EXEGM2Calc_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBGM2Calc)

clean-$(MODNAME)-obj:
-rm -f $(LIBGM2Calc_OBJ)
-rm -f $(EXEGM2Calc_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIBGM2Calc)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(EXEGM2Calc_EXE)

distclean-$(MODNAME): clean-$(MODNAME)

clean-obj:: clean-$(MODNAME)-obj

clean:: clean-$(MODNAME)

distclean:: distclean-$(MODNAME)
Expand Down
14 changes: 10 additions & 4 deletions addons/test_call_tsil/module.mk
Expand Up @@ -43,13 +43,20 @@ LIBtest_call_tsil := \
LIBtest_call_tsil_INSTALL_DIR := \
$(INSTALL_DIR)/$(DIR)

.PHONY: clean-$(MODNAME) clean-$(MODNAME)-dep clean-$(MODNAME)-obj \
clean-$(MODNAME)-src distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj clean-$(MODNAME)-src \
distclean-$(MODNAME)

all-$(MODNAME): $(LIBtest_call_tsil) $(EXEtest_call_tsil_EXE)
@true

clean-$(MODNAME)-dep:
-rm -f $(LIBtest_call_tsil_DEP)
-rm -f $(EXEtest_call_tsil_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBtest_call_tsil)

clean-$(MODNAME)-obj:
-rm -f $(LIBtest_call_tsil_OBJ)
-rm -f $(EXEtest_call_tsil_OBJ)
Expand All @@ -62,8 +69,7 @@ clean-$(MODNAME)-src:
clean-$(MODNAME): clean-$(MODNAME)-src
# END: NOT EXPORTED ##########################################

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIBtest_call_tsil)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(EXEtest_call_tsil_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down
9 changes: 7 additions & 2 deletions config/module.mk
Expand Up @@ -36,9 +36,11 @@ FLEXIBLESUSY_GIT_COMMIT_FILE := \
REMOVE_EXPORT_MARKERS := \
$(DIR)/remove_export_markers.sh

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME):
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand All @@ -55,10 +57,13 @@ endif
clean-$(MODNAME)-dep:
@true

clean-$(MODNAME)-lib:
@true

clean-$(MODNAME)-obj:
-rm -f $(DEPGEN_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(DEPGEN_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down
2 changes: 2 additions & 0 deletions doc/building.dox
Expand Up @@ -240,6 +240,8 @@ remove model-specific files:

make clean-<model>-dep # deletes .d files

make clean-<model>-lib # deletes library

make clean-<model>-obj # deletes .o files

make clean-<model>-src # deletes generated files
Expand Down
1 change: 1 addition & 0 deletions doc/module.mk
Expand Up @@ -65,6 +65,7 @@ doc-html: $(INDEX_PAGE)
doc-man: $(MAN_PAGE)

all-$(MODNAME): doc-html doc-man doc-pdf
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand Down
8 changes: 6 additions & 2 deletions examples/module.mk
Expand Up @@ -17,18 +17,22 @@ STANDALONE_DIR := \
$(DIR)/standalone-rge \
$(DIR)/tower

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME): $(EXAMPLES_EXE)
@true

clean-$(MODNAME)-dep:
-rm -f $(EXAMPLES_DEP)

clean-$(MODNAME)-lib:
@true

clean-$(MODNAME)-obj:
-rm -f $(EXAMPLES_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(EXAMPLES_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down
11 changes: 8 additions & 3 deletions fflite/module.mk
Expand Up @@ -42,9 +42,11 @@ LIBFFLITE := $(DIR)/lib$(MODNAME)$(LIBEXT)

LIBFFLITE_INSTALL_DIR := $(INSTALL_DIR)/$(DIR)

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME): $(LIBFFLITE)
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand All @@ -57,11 +59,14 @@ endif
clean-$(MODNAME)-dep:
-rm -f $(LIBFFLITE_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBFFLITE)

clean-$(MODNAME)-obj:
-rm -f $(LIBFFLITE_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIBFFLITE)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
@true

distclean-$(MODNAME): clean-$(MODNAME)

Expand Down
11 changes: 8 additions & 3 deletions legacy/module.mk
Expand Up @@ -25,9 +25,11 @@ LIBLEGACY := $(DIR)/lib$(MODNAME)$(LIBEXT)

LIBLEGACY_INSTALL_DIR := $(INSTALL_DIR)/$(DIR)

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME): $(LIBLEGACY)
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand All @@ -40,11 +42,14 @@ endif
clean-$(MODNAME)-dep:
-rm -f $(LIBLEGACY_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBLEGACY)

clean-$(MODNAME)-obj:
-rm -f $(LIBLEGACY_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIBLEGACY)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
@true

distclean-$(MODNAME): clean-$(MODNAME)

Expand Down
1 change: 1 addition & 0 deletions slhaea/module.mk
Expand Up @@ -12,6 +12,7 @@ SLHAEA_INSTALL_DIR := $(INSTALL_DIR)/$(DIR)
.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)

all-$(MODNAME):
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand Down
11 changes: 8 additions & 3 deletions src/module.mk
Expand Up @@ -141,9 +141,11 @@ LIBFLEXI := $(DIR)/lib$(MODNAME)$(LIBEXT)

LIBFLEXI_INSTALL_DIR := $(INSTALL_DIR)/$(DIR)

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj distclean-$(MODNAME)

all-$(MODNAME): $(LIBFLEXI)
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand All @@ -156,11 +158,14 @@ endif
clean-$(MODNAME)-dep:
-rm -f $(LIBFLEXI_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBFLEXI)

clean-$(MODNAME)-obj:
-rm -f $(LIBFLEXI_OBJ)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIBFLEXI)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
@true

distclean-$(MODNAME): clean-$(MODNAME)

Expand Down
14 changes: 10 additions & 4 deletions templates/module.addon.mk.in
Expand Up @@ -40,13 +40,20 @@ LIB@ADDON@ := \
LIB@ADDON@_INSTALL_DIR := \
$(INSTALL_DIR)/$(DIR)

.PHONY: clean-$(MODNAME) clean-$(MODNAME)-dep clean-$(MODNAME)-obj \
clean-$(MODNAME)-src distclean-$(MODNAME)
.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-dep \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj clean-$(MODNAME)-src \
distclean-$(MODNAME)

all-$(MODNAME): $(LIB@ADDON@) $(EXE@ADDON@_EXE)
@true

clean-$(MODNAME)-dep:
-rm -f $(LIB@ADDON@_DEP)
-rm -f $(EXE@ADDON@_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIB@ADDON@)

clean-$(MODNAME)-obj:
-rm -f $(LIB@ADDON@_OBJ)
-rm -f $(EXE@ADDON@_OBJ)
Expand All @@ -59,8 +66,7 @@ clean-$(MODNAME)-src:
clean-$(MODNAME): clean-$(MODNAME)-src
# END: NOT EXPORTED ##########################################

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIB@ADDON@)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(EXE@ADDON@_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down
15 changes: 9 additions & 6 deletions templates/module.mk.in
Expand Up @@ -145,11 +145,12 @@ SARAH_MODEL_FILES_@CLASSNAME@ := \
endif

.PHONY: all-$(MODNAME) clean-$(MODNAME) clean-$(MODNAME)-src \
clean-$(MODNAME)-dep clean-$(MODNAME)-obj \
distclean-$(MODNAME) run-metacode-$(MODNAME) \
pack-$(MODNAME)-src
clean-$(MODNAME)-dep clean-$(MODNAME)-lib \
clean-$(MODNAME)-obj distclean-$(MODNAME) \
run-metacode-$(MODNAME) pack-$(MODNAME)-src

all-$(MODNAME): $(LIB@CLASSNAME@)
all-$(MODNAME): $(LIB@CLASSNAME@) $(EXE@CLASSNAME@_EXE)
@true

ifneq ($(INSTALL_DIR),)
install-src::
Expand All @@ -169,6 +170,9 @@ clean-$(MODNAME)-dep:
-rm -f $(LIB@CLASSNAME@_DEP)
-rm -f $(EXE@CLASSNAME@_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIB@CLASSNAME@)

clean-$(MODNAME)-obj:
-rm -f $(LIB@CLASSNAME@_OBJ)
-rm -f $(EXE@CLASSNAME@_OBJ)
Expand All @@ -186,8 +190,7 @@ clean-$(MODNAME)-src:
clean-$(MODNAME): clean-$(MODNAME)-src
# END: NOT EXPORTED ##########################################

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj
-rm -f $(LIB@CLASSNAME@)
clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
-rm -f $(EXE@CLASSNAME@_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down
11 changes: 7 additions & 4 deletions test/module.mk
Expand Up @@ -355,17 +355,21 @@ $(DIR)/test_pv_softsusy.x : CPPFLAGS += $(BOOSTFLAGS) $(EIGENFLAGS) -DTEST_PV_S
endif

.PHONY: all-$(MODNAME) clean-$(MODNAME) distclean-$(MODNAME) \
clean-$(MODNAME)-log \
clean-$(MODNAME)-dep clean-$(MODNAME)-log \
clean-$(MODNAME)-lib clean-$(MODNAME)-obj \
execute-tests execute-meta-tests execute-compiled-tests \
execute-shell-tests

all-$(MODNAME): $(LIBTEST) $(TEST_EXE)
all-$(MODNAME): $(LIBTEST) $(TEST_EXE) $(TEST_LOG)
@true

clean-$(MODNAME)-dep:
-rm -f $(TEST_DEP)
-rm -f $(LIBTEST_DEP)

clean-$(MODNAME)-lib:
-rm -f $(LIBTEST)

clean-$(MODNAME)-obj:
-rm -f $(TEST_OBJ)
-rm -f $(LIBTEST_OBJ)
Expand All @@ -374,8 +378,7 @@ clean-$(MODNAME)-log:
-rm -f $(TEST_LOG)

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-obj \
clean-$(MODNAME)-log
-rm -f $(LIBTEST)
clean-$(MODNAME)-lib clean-$(MODNAME)-log
-rm -f $(TEST_EXE)

distclean-$(MODNAME): clean-$(MODNAME)
Expand Down

0 comments on commit d13591d

Please sign in to comment.