Skip to content

Commit

Permalink
don't let `make clean' delete generated files
Browse files Browse the repository at this point in the history
For that purpose use now

   make clean-generated   # deletes all generated files

or

   make clean-<model>-src # deletes generated files of <model>
  • Loading branch information
Alexander Voigt authored and Alexander Voigt committed Aug 26, 2016
1 parent 60a8ccc commit 728b5ea
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README
Expand Up @@ -354,24 +354,27 @@ Cleaning
There are several make targets to remove generated files, compiled
object files, libraries or executables:

$ make clean # deletes all .d .o .a .x and generated files
$ make clean # deletes all .d .o .a .x files

$ make distclean # calls `make clean' and deletes in addition
$ make distclean # does `clean' and `clean-generated'
# and deletes in addition:
# Makefile flexiblesusy-config config.*
# config/list_sarah_model_files.sh

$ make clean-dep # deletes all .d files

$ make clean-executables # deletes all .x files

$ make clean-generated # deletes generated files

$ make clean-lib # deletes all libraries

$ make clean-obj # deletes all .o files

For each model <model> or addon there are specific clean targets to
remove model-specific files:

$ make clean-<model> # deletes .d .o .a .x and generated files
$ make clean-<model> # deletes .d .o .a .x files

$ make distclean-<model> # same as `make clean-<model>'

Expand Down
4 changes: 2 additions & 2 deletions config/Makefile.in
Expand Up @@ -117,8 +117,8 @@ CONVERT_DOS_PATHS := config/convert_dos_paths.sh
README_FILE := README

.PHONY: all allsrc allexec alllib alltest clean clean-dep \
clean-executables clean-lib clean-obj depend distclean \
release-tag release-head showbuild tag
clean-executables clean-generated clean-lib clean-obj \
depend distclean release-tag release-head showbuild tag

all:
ifeq ($(ENABLE_META),yes)
Expand Down
7 changes: 5 additions & 2 deletions doc/building.dox
Expand Up @@ -217,16 +217,19 @@ dynamic libraries.
There are several make targets to remove generated files, compiled
object files, libraries or executables:

make clean # deletes all .d .o .a .x and generated files
make clean # deletes all .d .o .a .x files

make distclean # calls `make clean' and deletes in addition
make distclean # does `clean' and `clean-generated'
# and deletes in addition:
# Makefile flexiblesusy-config config.*
# config/list_sarah_model_files.sh

make clean-dep # deletes all .d files

make clean-executables # deletes all .x files

make clean-generated # deletes generated files

make clean-lib # deletes all libraries

make clean-obj # deletes all .o files
Expand Down
4 changes: 3 additions & 1 deletion templates/module.addon.mk.in
Expand Up @@ -64,14 +64,16 @@ clean-$(MODNAME)-obj:
clean-$(MODNAME)-src:
@true

clean-$(MODNAME): clean-$(MODNAME)-src
distclean-$(MODNAME): clean-$(MODNAME)-src
# END: NOT EXPORTED ##########################################

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

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

clean-generated:: clean-$(MODNAME)-src

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

clean:: clean-$(MODNAME)
Expand Down
4 changes: 3 additions & 1 deletion templates/module.mk.in
Expand Up @@ -188,7 +188,7 @@ clean-$(MODNAME)-src:
-rm -f $(@CLASSNAME@_SLHA_INPUT)
-rm -f $(@CLASSNAME@_GNUPLOT)

clean-$(MODNAME): clean-$(MODNAME)-src
distclean-$(MODNAME): clean-$(MODNAME)-src
# END: NOT EXPORTED ##########################################

clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
Expand All @@ -197,6 +197,8 @@ clean-$(MODNAME): clean-$(MODNAME)-dep clean-$(MODNAME)-lib clean-$(MODNAME)-obj
distclean-$(MODNAME): clean-$(MODNAME)
@true

clean-generated:: clean-$(MODNAME)-src

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

clean:: clean-$(MODNAME)
Expand Down

0 comments on commit 728b5ea

Please sign in to comment.