From 2e0e580c980c2ad7ddef2ac098987a81be32a15d Mon Sep 17 00:00:00 2001 From: Jacqueline Deans Date: Tue, 13 Jun 2023 09:50:19 -0500 Subject: [PATCH] Add make spotless target to get rid of config info, patch together various other spots missed by clean (#1515) --- Makefile | 11 ++++++++++- libexec/trick/pm/gte.pm | 2 +- share/trick/makefiles/Makefile.common | 5 +++-- trick_source/data_products/DPX/makefile | 1 + .../sim_services/CommandLineArguments/test/Makefile | 1 + 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index d6499c05..48cdf205 100644 --- a/Makefile +++ b/Makefile @@ -370,10 +370,11 @@ clean_ICG : $(MAKE) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean clean_unit_test: - @/bin/rm -rf ${TRICK_HOME}/trick_test/*.xml + @/bin/rm -rf ${TRICK_HOME}/trick_test/ @ for i in $(UNIT_TEST_DIRS) ; do \ $(MAKE) -C $$i clean ; \ done + $(MAKE) -C $(DPX_UNIT_TEST_DIR) clean clean_doxygen: @ $(MAKE) -C ${TRICK_HOME}/doxygen clean @@ -394,9 +395,17 @@ clean_sim_serv_xml: clean_test: clean_unit_test -@ $(MAKE) -C trick_sims clean -@ $(MAKE) -C test clean + @/bin/rm -rf ${TRICK_HOME}/trickops_logs clean_gui: clean_java +spotless: clean clean_test + rm -f config.log config.status share/trick/makefiles/config_user.mk + +apocalypse: spotless + @echo "I love the smell of napalm in the morning" + + ################################################################################ # INSTALL Targets ################################################################################ diff --git a/libexec/trick/pm/gte.pm b/libexec/trick/pm/gte.pm index c62661e7..6f8ae05e 100644 --- a/libexec/trick/pm/gte.pm +++ b/libexec/trick/pm/gte.pm @@ -59,7 +59,7 @@ sub gte (@) { # remove possible ccache from TRICK_CC my ($temp) = $ENV{TRICK_CC} ; $temp =~ s/.*?ccache\s+// ; - $ret = `$temp --dumpfullversion dumpversion` ; + $ret = `$temp -dumpfullversion dumpversion` ; } } else { diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 77978933..104d5aad 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -81,8 +81,9 @@ TRICK_RANLIB = ifndef CONFIG_MK - ifneq ($(MAKECMDGOALS), clean) - $(error Please run $(TRICK_HOME)/configure before running make) +# These are the targets that are allowed to run without configure + ifeq ($(filter $(MAKECMDGOALS), clean real_clean spotless apocalypse),) + $(error Please run $(TRICK_HOME)/configure before running make $(MAKECMDGOALS)) endif endif diff --git a/trick_source/data_products/DPX/makefile b/trick_source/data_products/DPX/makefile index ab140972..aad9ca0d 100644 --- a/trick_source/data_products/DPX/makefile +++ b/trick_source/data_products/DPX/makefile @@ -52,6 +52,7 @@ clean: $(MAKE) -C TESTING spotless $(MAKE) -C APPS spotless $(MAKE) -C XML clean + $(MAKE) -C test clean ${RM} *~ ${RM} *.o diff --git a/trick_source/sim_services/CommandLineArguments/test/Makefile b/trick_source/sim_services/CommandLineArguments/test/Makefile index 05e94dae..acdf1ccb 100644 --- a/trick_source/sim_services/CommandLineArguments/test/Makefile +++ b/trick_source/sim_services/CommandLineArguments/test/Makefile @@ -34,6 +34,7 @@ test: $(TESTS) clean : rm -f $(TESTS) *.o *.gcno *.gcda + rm -rf a pre_existing_output_dir/a ../a create_path_test.o : create_path_test.cpp $(TRICK_CXX) $(TRICK_CXXFLAGS) -c $<