Skip to content

Commit 2e0e580

Browse files
authored
Add make spotless target to get rid of config info, patch together various other spots missed by clean (#1515)
1 parent 479171f commit 2e0e580

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,11 @@ clean_ICG :
370370
$(MAKE) -C ${TRICK_HOME}/trick_source/codegen/Interface_Code_Gen clean
371371

372372
clean_unit_test:
373-
@/bin/rm -rf ${TRICK_HOME}/trick_test/*.xml
373+
@/bin/rm -rf ${TRICK_HOME}/trick_test/
374374
@ for i in $(UNIT_TEST_DIRS) ; do \
375375
$(MAKE) -C $$i clean ; \
376376
done
377+
$(MAKE) -C $(DPX_UNIT_TEST_DIR) clean
377378

378379
clean_doxygen:
379380
@ $(MAKE) -C ${TRICK_HOME}/doxygen clean
@@ -394,9 +395,17 @@ clean_sim_serv_xml:
394395
clean_test: clean_unit_test
395396
-@ $(MAKE) -C trick_sims clean
396397
-@ $(MAKE) -C test clean
398+
@/bin/rm -rf ${TRICK_HOME}/trickops_logs
397399

398400
clean_gui: clean_java
399401

402+
spotless: clean clean_test
403+
rm -f config.log config.status share/trick/makefiles/config_user.mk
404+
405+
apocalypse: spotless
406+
@echo "I love the smell of napalm in the morning"
407+
408+
400409
################################################################################
401410
# INSTALL Targets
402411
################################################################################

libexec/trick/pm/gte.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ sub gte (@) {
5959
# remove possible ccache from TRICK_CC
6060
my ($temp) = $ENV{TRICK_CC} ;
6161
$temp =~ s/.*?ccache\s+// ;
62-
$ret = `$temp --dumpfullversion dumpversion` ;
62+
$ret = `$temp -dumpfullversion dumpversion` ;
6363
}
6464
}
6565
else {

share/trick/makefiles/Makefile.common

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@ TRICK_RANLIB =
8181

8282

8383
ifndef CONFIG_MK
84-
ifneq ($(MAKECMDGOALS), clean)
85-
$(error Please run $(TRICK_HOME)/configure before running make)
84+
# These are the targets that are allowed to run without configure
85+
ifeq ($(filter $(MAKECMDGOALS), clean real_clean spotless apocalypse),)
86+
$(error Please run $(TRICK_HOME)/configure before running make $(MAKECMDGOALS))
8687
endif
8788
endif
8889

trick_source/data_products/DPX/makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ clean:
5252
$(MAKE) -C TESTING spotless
5353
$(MAKE) -C APPS spotless
5454
$(MAKE) -C XML clean
55+
$(MAKE) -C test clean
5556
${RM} *~
5657
${RM} *.o
5758

trick_source/sim_services/CommandLineArguments/test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ test: $(TESTS)
3434

3535
clean :
3636
rm -f $(TESTS) *.o *.gcno *.gcda
37+
rm -rf a pre_existing_output_dir/a ../a
3738

3839
create_path_test.o : create_path_test.cpp
3940
$(TRICK_CXX) $(TRICK_CXXFLAGS) -c $<

0 commit comments

Comments
 (0)