From: Jean Privat Date: Tue, 26 Aug 2014 17:53:05 +0000 (-0400) Subject: Makefile: clean the clean recipes X-Git-Tag: v0.6.8~8^2~1 X-Git-Url: http://nitlanguage.org Makefile: clean the clean recipes And remove the useless dist-clean recipe Signed-off-by: Jean Privat --- diff --git a/Makefile b/Makefile index bc06e15..e52265e 100644 --- a/Makefile +++ b/Makefile @@ -68,14 +68,11 @@ doc/nitc/index.html: bin/nitdoc clean: rm -rf -- .nit_compile 2> /dev/null || true + rm -rf -- doc/stdlib doc/nitc || true cd c_src; make clean cd src; make clean - cd doc; make clean cd tests; make clean - -distclean: clean - rm -rf -- bin/nitdoc bin/nits doc/stdlib 2> /dev/null || true - cd c_src; make distclean - cd src/parser; make distclean - cd doc; make distclean - cd tests; make distclean + for m in $(PROGS); do \ + $(MAKE) clean -C "$$m"; \ + test -d $$m/.nit_compile && rm -r $$m/.nit_compile; \ + done || true diff --git a/c_src/Makefile b/c_src/Makefile index 3dbc4f3..2087b7b 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -327,4 +327,4 @@ nitg: nith.classes.1.o nith.classes.2.o nith.classes.3.o nith.classes.4.o nith.c $(CC) $(LDFLAGS) -o nitg nith.classes.1.o nith.classes.2.o nith.classes.3.o nith.classes.4.o nith.classes.5.o nith.classes.6.o nith.main.1.o nith.sep.1.o phase.sep.1.o toolcontext.sep.1.o opts.sep.1.o string.sep.1.o string.sep.2.o math.sep.1.o kernel.sep.1.o abstract_collection.sep.1.o range.sep.1.o list.sep.1.o array.sep.1.o sorter.sep.1.o hash_collection.sep.1.o environ.sep.1.o time.sep.1.o string_search.sep.1.o file.sep.1.o stream.sep.1.o exec.sep.1.o location.sep.1.o version.sep.1.o template.sep.1.o parser.sep.1.o parser.sep.2.o parser.sep.3.o parser.sep.4.o parser.sep.5.o parser.sep.6.o parser_prod.sep.1.o parser_prod.sep.2.o parser_prod.sep.3.o parser_prod.sep.4.o parser_prod.sep.5.o parser_prod.sep.6.o lexer.sep.1.o parser_nodes.sep.1.o lexer_work.sep.1.o tables.sep.1.o parser_work.sep.1.o poset.sep.1.o literal.sep.1.o scope.sep.1.o flow.sep.1.o local_var_init.sep.1.o typing.sep.1.o typing.sep.2.o modelize_property.sep.1.o modelize_property.sep.2.o modelize_class.sep.1.o modelbuilder.sep.1.o model.sep.1.o model.sep.2.o mmodule.sep.1.o mproject.sep.1.o model_base.sep.1.o more_collections.sep.1.o mdoc.sep.1.o annotation.sep.1.o auto_super_init.sep.1.o rapid_type_analysis.sep.1.o separate_erasure_compiler.sep.1.o separate_erasure_compiler.sep.2.o separate_compiler.sep.1.o separate_compiler.sep.2.o separate_compiler.sep.3.o separate_compiler.sep.4.o abstract_compiler.sep.1.o abstract_compiler.sep.2.o abstract_compiler.sep.3.o abstract_compiler.sep.4.o abstract_compiler.sep.5.o platform.sep.1.o c_tools.sep.1.o coloring.sep.1.o transform.sep.1.o astbuilder.sep.1.o astvalidation.sep.1.o nith.types.1.o nith.types.2.o nith.types.3.o nith.types.4.o nith.types.5.o time_nit.extern.o string_nit.extern.o file_nit.extern.o exec_nit.extern.o tables_nit.extern.o c_functions_hash.extern.o gc_chooser.extern.o string._ffi.extern.o string._nitni.extern.o kernel._ffi.extern.o kernel._nitni.extern.o $(LDLIBS) clean: - rm nith.classes.1.o nith.classes.2.o nith.classes.3.o nith.classes.4.o nith.classes.5.o nith.classes.6.o nith.main.1.o nith.sep.1.o phase.sep.1.o toolcontext.sep.1.o opts.sep.1.o string.sep.1.o string.sep.2.o math.sep.1.o kernel.sep.1.o abstract_collection.sep.1.o range.sep.1.o list.sep.1.o array.sep.1.o sorter.sep.1.o hash_collection.sep.1.o environ.sep.1.o time.sep.1.o string_search.sep.1.o file.sep.1.o stream.sep.1.o exec.sep.1.o location.sep.1.o version.sep.1.o template.sep.1.o parser.sep.1.o parser.sep.2.o parser.sep.3.o parser.sep.4.o parser.sep.5.o parser.sep.6.o parser_prod.sep.1.o parser_prod.sep.2.o parser_prod.sep.3.o parser_prod.sep.4.o parser_prod.sep.5.o parser_prod.sep.6.o lexer.sep.1.o parser_nodes.sep.1.o lexer_work.sep.1.o tables.sep.1.o parser_work.sep.1.o poset.sep.1.o literal.sep.1.o scope.sep.1.o flow.sep.1.o local_var_init.sep.1.o typing.sep.1.o typing.sep.2.o modelize_property.sep.1.o modelize_property.sep.2.o modelize_class.sep.1.o modelbuilder.sep.1.o model.sep.1.o model.sep.2.o mmodule.sep.1.o mproject.sep.1.o model_base.sep.1.o more_collections.sep.1.o mdoc.sep.1.o annotation.sep.1.o auto_super_init.sep.1.o rapid_type_analysis.sep.1.o separate_erasure_compiler.sep.1.o separate_erasure_compiler.sep.2.o separate_compiler.sep.1.o separate_compiler.sep.2.o separate_compiler.sep.3.o separate_compiler.sep.4.o abstract_compiler.sep.1.o abstract_compiler.sep.2.o abstract_compiler.sep.3.o abstract_compiler.sep.4.o abstract_compiler.sep.5.o platform.sep.1.o c_tools.sep.1.o coloring.sep.1.o transform.sep.1.o astbuilder.sep.1.o astvalidation.sep.1.o nith.types.1.o nith.types.2.o nith.types.3.o nith.types.4.o nith.types.5.o time_nit.extern.o string_nit.extern.o file_nit.extern.o exec_nit.extern.o tables_nit.extern.o c_functions_hash.extern.o gc_chooser.extern.o string._ffi.extern.o string._nitni.extern.o kernel._ffi.extern.o kernel._nitni.extern.o 2>/dev/null + rm nith.classes.1.o nith.classes.2.o nith.classes.3.o nith.classes.4.o nith.classes.5.o nith.classes.6.o nith.main.1.o nith.sep.1.o phase.sep.1.o toolcontext.sep.1.o opts.sep.1.o string.sep.1.o string.sep.2.o math.sep.1.o kernel.sep.1.o abstract_collection.sep.1.o range.sep.1.o list.sep.1.o array.sep.1.o sorter.sep.1.o hash_collection.sep.1.o environ.sep.1.o time.sep.1.o string_search.sep.1.o file.sep.1.o stream.sep.1.o exec.sep.1.o location.sep.1.o version.sep.1.o template.sep.1.o parser.sep.1.o parser.sep.2.o parser.sep.3.o parser.sep.4.o parser.sep.5.o parser.sep.6.o parser_prod.sep.1.o parser_prod.sep.2.o parser_prod.sep.3.o parser_prod.sep.4.o parser_prod.sep.5.o parser_prod.sep.6.o lexer.sep.1.o parser_nodes.sep.1.o lexer_work.sep.1.o tables.sep.1.o parser_work.sep.1.o poset.sep.1.o literal.sep.1.o scope.sep.1.o flow.sep.1.o local_var_init.sep.1.o typing.sep.1.o typing.sep.2.o modelize_property.sep.1.o modelize_property.sep.2.o modelize_class.sep.1.o modelbuilder.sep.1.o model.sep.1.o model.sep.2.o mmodule.sep.1.o mproject.sep.1.o model_base.sep.1.o more_collections.sep.1.o mdoc.sep.1.o annotation.sep.1.o auto_super_init.sep.1.o rapid_type_analysis.sep.1.o separate_erasure_compiler.sep.1.o separate_erasure_compiler.sep.2.o separate_compiler.sep.1.o separate_compiler.sep.2.o separate_compiler.sep.3.o separate_compiler.sep.4.o abstract_compiler.sep.1.o abstract_compiler.sep.2.o abstract_compiler.sep.3.o abstract_compiler.sep.4.o abstract_compiler.sep.5.o platform.sep.1.o c_tools.sep.1.o coloring.sep.1.o transform.sep.1.o astbuilder.sep.1.o astvalidation.sep.1.o nith.types.1.o nith.types.2.o nith.types.3.o nith.types.4.o nith.types.5.o time_nit.extern.o string_nit.extern.o file_nit.extern.o exec_nit.extern.o tables_nit.extern.o c_functions_hash.extern.o gc_chooser.extern.o string._ffi.extern.o string._nitni.extern.o kernel._ffi.extern.o kernel._nitni.extern.o 2>/dev/null || true diff --git a/contrib/jwrapper/Makefile b/contrib/jwrapper/Makefile index 4f1458a..5a5f77f 100644 --- a/contrib/jwrapper/Makefile +++ b/contrib/jwrapper/Makefile @@ -11,3 +11,4 @@ clean: rm -f bin/javap_test_parser bin/jwrapper rm -f gen/* rm -rf .nit_compile/ + rm src/javap_lexer.nit src/javap_parser.nit src/javap_test_parser.nit diff --git a/contrib/nitcc/src/Makefile b/contrib/nitcc/src/Makefile index 7bad986..b805c33 100644 --- a/contrib/nitcc/src/Makefile +++ b/contrib/nitcc/src/Makefile @@ -36,4 +36,13 @@ minilang: nitcc ../examples/minilang.sablecc ../examples/minilang.nit tests: cd ../tests && ./run +clean: + rm -r .nit_compile \ + *.dot *.out \ + nitcc_lexer.nit nitcc_parser.nit nitcc_test_parser.nit nitcc_parser_gen \ + nitcc0 nitcc1 \ + calc \ + ../examples/*.dot ../examples/*.out ../examples/*_lexer.nit ../examples/*_parser.nit ../examples/*_test_parser.nit \ + 2>/dev/null || true + .PHONY: tests diff --git a/examples/mnit_ballz/Makefile b/examples/mnit_ballz/Makefile index 22a54a7..ad19515 100644 --- a/examples/mnit_ballz/Makefile +++ b/examples/mnit_ballz/Makefile @@ -12,4 +12,4 @@ icon: ../../contrib/inkscape_tools/bin/svg_to_icons ../../contrib/inkscape_tools/bin/svg_to_icons art/ball.svg --android --out res/ clean: - rm -rf bin + rm -rf bin res diff --git a/examples/mnit_dino/Makefile b/examples/mnit_dino/Makefile index 5dab845..607d571 100644 --- a/examples/mnit_dino/Makefile +++ b/examples/mnit_dino/Makefile @@ -24,4 +24,4 @@ pngs: tools/svg-to-pngs art/drawing.svg assets/images clean: - rm -rf bin/ doc/ + rm -rf bin/ doc/ res/ diff --git a/examples/mnit_moles/Makefile b/examples/mnit_moles/Makefile index 5d91d53..d46e5fc 100644 --- a/examples/mnit_moles/Makefile +++ b/examples/mnit_moles/Makefile @@ -23,4 +23,4 @@ pngs: ../mnit_dino/tools/svg-to-pngs art/drawing.svg assets/images clean: - rm -rf bin + rm -rf bin res diff --git a/src/Makefile b/src/Makefile index 72b8c09..44f2a21 100644 --- a/src/Makefile +++ b/src/Makefile @@ -53,8 +53,5 @@ parser/parser.nit: cd parser; make clean: - rm -rf -- .nit_compile* version.nit 2> /dev/null || true + rm -rf -- .nit_compile* version.nit nitg_0 2> /dev/null || true cd parser; make clean - -distclean: clean - cd parser; make distclean diff --git a/src/parser/Makefile b/src/parser/Makefile index 23d31c6..db69b26 100644 --- a/src/parser/Makefile +++ b/src/parser/Makefile @@ -34,8 +34,6 @@ parser.nit: .nit.sablecc3 xss/*.xss clean: rm -f -- .nit.sablecc3 .nit.sablecc3.dump .parser-nofact.nit || true -distclean: clean - maintainer-clean: clean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." diff --git a/tests/Makefile b/tests/Makefile index dd8cb87..24c0604 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -46,6 +46,4 @@ store: ./store_save.sh *.nit clean: - rm -r -f -- out/ alt .nit_compile errlist 2> /dev/null || true - -distclean: clean + rm -r -f -- out/ alt .nit_compile errlist errlist.bak *.xml 2> /dev/null || true