diff --git a/bin/pm/make_makefile.pm b/bin/pm/make_makefile.pm index a3deb7a1..5482dcf4 100644 --- a/bin/pm/make_makefile.pm +++ b/bin/pm/make_makefile.pm @@ -668,7 +668,10 @@ clean: tidy clean_obj clean_model_io_src clean_lex_yacc_src real_clean: clean spotless: clean -\t@ echo \"Removed all S_mains\"\n" ; +\t@ echo \"Removed all S_mains\" + +distclean: clean +\t-rm -f makefile\n" ; foreach $k ( sort keys %files_by_dir ) { if ($files_by_dir{$k}{"writable"}) { @@ -786,7 +789,7 @@ clean_obj: clean_model_c_obj clean_model_cpp_obj clean_model_io_obj clean_lex_ya print MAKEFILE "\t@ mkdir -p \$\@\n" ; } - print MAKEFILE "\napocalypse: spotless\n" ; + print MAKEFILE "\napocalypse: distclean\n" ; foreach my $l ( @{$$sim_ref{sim_libraries}} ) { print MAKEFILE "\t- \$(MAKE) -C $l spotless\n" ; } diff --git a/makefiles/Makefile.sim b/makefiles/Makefile.sim index c1038135..2188cce8 100644 --- a/makefiles/Makefile.sim +++ b/makefiles/Makefile.sim @@ -39,9 +39,12 @@ S_define: model_dirs: @${TRICK_HOME}/bin/C3PO -z -tidy clean real_clean spotless apocalypse sie ICG force_ICG help convert_swig S_define_exp: +tidy clean real_clean spotless sie ICG force_ICG help convert_swig S_define_exp: @if [ -f Makefile_sim ] ; then $(MAKE) --no-print-directory -f Makefile_sim $@ ; else echo "No Makefile_sim found" ; fi +distclean apocalypse: + @if [ -f Makefile_sim ] ; then $(MAKE) --no-print-directory -f Makefile_sim $@ ; else rm makefile; fi + # Dependencies to other files that may cause a re-CP -include object_${TRICK_HOST_CPU}/S_define.deps