diff --git a/bin/trick-CP b/bin/trick-CP index 9990f876..92d5dc64 100755 --- a/bin/trick-CP +++ b/bin/trick-CP @@ -136,6 +136,11 @@ convert_swig: build/S_library_swig S_define_exp: $(TRICK_CC) -E -C -xc++ ${TRICK_SFLAGS} $(TRICK_SYSTEM_SFLAGS) S_define > $@ +# prints the value of a makefile variable, example invocation "make print-TRICK_CXXFLAGS" +# This rule is used by trick-config +print-%: + @echo '$*=$($*)' + help: @echo -e "\ Simulation make options:\n\ diff --git a/bin/trick-config b/bin/trick-config index 4cb0827e..fc9257b3 100755 --- a/bin/trick-config +++ b/bin/trick-config @@ -26,7 +26,7 @@ sub print_prefix() { # Run a special rule in Makefile.sim that prints the value of the environment variable we request sub print_makefile_var($) { - open(README, "make -f $ENV{TRICK_HOME}/share/trick/makefiles/Makefile.common print-@_ | ") or + open(README, "make -f $ENV{TRICK_HOME}/share/trick/makefiles/Makefile.trickconfig print-@_ | ") or die "Couldn't fork $!\n" ; while () { /=(.*)/ && print "$1\n" ; diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 9730e0c6..084d8307 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -155,8 +155,3 @@ TRICK_DEFINES = $(shell $(PERL) -e '@defines = "${TRICK_CFLAGS}" =~ /-D\s*(\S+) DEPFILE = $(PWD)/Makefile_deps DEPTEMPFILE = $(PWD)/Makefile_temp_depends - -# prints the value of a makefile variable, example invocation "make print-TRICK_CXXFLAGS" -# This rule is used by trick-config -print-%: - @echo '$*=$($*)'