diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.MELT | 4 | ||||
-rw-r--r-- | gcc/melt-module.mk | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT index 906fecb47a3..5c492062a5e 100644 --- a/gcc/ChangeLog.MELT +++ b/gcc/ChangeLog.MELT @@ -1,4 +1,8 @@ +2012-05-11 Basile Starynkevitch <basile@starynkevitch.net> + * melt-module.mk (MELT_AUTOHOST_H): New. + (MELTGCC_BUILD_WITH_CXX): Use it. + 2012-05-09 Basile Starynkevitch <basile@starynkevitch.net> * melt-runtime.h (melt_set_real_timer_millisec): New declaration. (melt_longsbucket_nth_key, melt_longsbucket_nth_val): New diff --git a/gcc/melt-module.mk b/gcc/melt-module.mk index 9522a7fc767..549f76f0ce5 100644 --- a/gcc/melt-module.mk +++ b/gcc/melt-module.mk @@ -89,13 +89,18 @@ ifndef MELTGCC MELTGCC = $(or $(CC),gcc) endif +### the auto-host.h for the MELTGCC compiler +ifndef MELT_AUTOHOST_H +MELT_AUTOHOST_H = $(or $(wildcard auto-host.h),$(shell $(MELTGCC) -print-file-name=plugin/include/auto-host.h)) +endif + ## gives yes if MELTGCC has been built with C++ or else the empty ## string. Notice that the auto-host.h file can either be from ## plugin, or from the current directory when building the MELT ## branch. ifndef MELTGCC_BUILD_WITH_CXX -MELTGCC_BUILD_WITH_CXX = $(shell grep -q -s 'define[[:space:]]\+ENABLE_BUILD_WITH_CXX[[:space:]]\+1' \ - `$(MELTGCC) -print-file-name=plugin/include/auto-host.h` auto-host.h && echo yes) +MELTGCC_BUILD_WITH_CXX = $(shell grep -q -s 'define[[:space:]]\+ENABLE_BUILD_WITH_CXX[[:space:]]\+1' $(MELT_AUTOHOST_H)\ + && echo yes) endif ## The compiler and flags used to compile MELT generated code. For a |