Partially fixed test cleaning to remove trickification artifacts

This commit is contained in:
Patrick Herrington 2024-10-23 16:43:46 -05:00
parent 044693b03c
commit 1ae305b446
6 changed files with 17 additions and 6 deletions

View File

@ -12,7 +12,7 @@ def find_files_by_extension(loc, ext):
files = list(path.rglob(f'*.{ext}'))
return files
files = find_files_by_extension("/users/plherrin/trick/include/", "hh")
files = find_files_by_extension(loc, "hh")
s_source = open("S_source.hh", 'w')
for i in range(len(files)):
s_source.write('#include "' + str(files[i]) + '"\n')

View File

@ -202,7 +202,7 @@ S_source.hh :
# dependency list. The method is laid out in more detail here:
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
$(BUILD_DIR)S_source.d: | $(BUILD_DIR) S_source.hh
$(BUILD_DIR)S_source.d: S_source.hh | $(BUILD_DIR)
$(call ECHO_AND_LOG,$(TRICK_HOME)/bin/trick-ICG $(TRICK_CXXFLAGS) $(TRICK_SYSTEM_CXXFLAGS) $(TRICK_ICGFLAGS) S_source.hh)
$(call ECHO_AND_LOG,$(TRICK_HOME)/$(LIBEXEC)/trick/make_makefile_swig)
$(call ECHO_AND_LOG,$(TRICK_CC) -MM -MP -MT $@ -MF $@ $(TRICKIFY_CXX_FLAGS) S_source.hh)

View File

@ -6,8 +6,14 @@ include ${TRICK_HOME}/share/trick/makefiles/Makefile.common
SIM_DIRECTORIES = $(wildcard SIM_*)
UNIT_TEST_RESULTS = $(addprefix $(TRICK_HOME)/trick_test/, $(addsuffix .xml, $(SIM_DIRECTORIES)))
clean_trickify:
for i in $(SIM_DIRECTORIES) ; do \
if [ -f "$$i/trickified_project/trickified/"[Mm]"akefile" ] ; then \
$(MAKE) -C $$i/trickified_project/trickified/ clean ; \
fi \
done
clean:
clean: clean_trickify
rm -f $(UNIT_TEST_RESULTS)
- for i in $(SIM_DIRECTORIES) ; do \
if [ -f "$$i/"[Mm]"akefile" ] ; then \

View File

@ -1,9 +1,11 @@
#include myproject.mk
PROJECT_HOME := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
TRICK_HOME := $(abspath $(PROJECT_HOME)/../../..)
export TRICKIFY_SOURCE := $(PROJECT_HOME)/include
export TRICKIFY_BUILD_TYPE := STATIC
export TRICKIFY_OBJECT_NAME := trickified_myproject.a
# export TRICKIFY_BUILD_TYPE := PLO
# export TRICKIFY_OBJECT_NAME := trickified_myproject.o
export TRICKIFY_CXX_FLAGS := -I$(PROJECT_HOME)/include -I$(TRICK_HOME)/include
all:
@ -11,3 +13,4 @@ all:
clean:
@rm -rf build python trick $(TRICKIFY_OBJECT_NAME)
@rm -rf $(MYPROJECT_TRICK)

View File

@ -11,7 +11,9 @@ MYPROJECT_INCLUDE := -I$(MYPROJECT_HOME)/include
TRICK_CFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
TRICK_CXXFLAGS += $(MYPROJECT_INCLUDE) $(MYPROJECT_SOURCE)
MYPROJECT_TRICK := $(MYPROJECT_HOME)/trickified/trickified_myproject.o
export TRICKIFY_BUILD_TYPE := STATIC
export TRICKIFY_OBJECT_NAME := trickified_myproject.a
MYPROJECT_TRICK := $(MYPROJECT_HOME)/trickified/$(TRICKIFY_OBJECT_NAME)
# Tell Trick the headers and source at this location are part of a
# Trickified project