Patchwork [MELT] Fix failing target 'melt-tiny-tests'

login
register
mail settings
Submitter Alexandre Lissy
Date Aug. 29, 2011, 3:33 p.m.
Message ID <1314631991-21476-1-git-send-email-alissy@mandriva.com>
Download mbox | patch
Permalink /patch/112091/
State New
Headers show

Comments

Alexandre Lissy - Aug. 29, 2011, 3:33 p.m.
The newly introduced target 'melt-tiny-tests' was buggy, this commit
fixes the issue by:
 - splitting target in two targets, introducing the
   'melt-sayhello.melt' target which produces the MELT code
   corresponding, with a dependency on
   $(melt_default_modules_list).modlis.
 - adding a dependency for target melt-tiny-test on melt-sayhello.melt
 - changing behavior of melt-tiny-tests to avoid hardcoding the
   previsously added dependency, using $(basename $<)
 - removing the '.c' extension in melt-output argument
 - adding bootstrapping flag
---
 gcc/ChangeLog.MELT |    3 +++
 gcc/melt-build.tpl |   20 ++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

Patch

diff --git a/gcc/ChangeLog.MELT b/gcc/ChangeLog.MELT
index d3ea85e..9ca1fc4 100644
--- a/gcc/ChangeLog.MELT
+++ b/gcc/ChangeLog.MELT
@@ -1,4 +1,7 @@ 
 2011-08-29  Alexandre Lissy  <alissy@mandriva.com>
+	* melt-build.tpl: Fix melt-tiny-tests failing target.
+
+2011-08-29  Alexandre Lissy  <alissy@mandriva.com>
 	* melt-runtime.c (melt_load_module_index): Fix loading path of .c
 	files.
 	* melt/warmelt-outobj.melt (output_melt_descriptor): Fix generation
diff --git a/gcc/melt-build.tpl b/gcc/melt-build.tpl
index 10462a4..7525b9e 100644
--- a/gcc/melt-build.tpl
+++ b/gcc/melt-build.tpl
@@ -562,18 +562,22 @@  melt-modules/[+base+].quicklybuilt.so: melt-sources/[+base+].c \
 ################
 
 #@ [+ (. (tpl-file-line))+]
-melt-tiny-tests: melt-modules melt-sources melt-all-modules melt-all-sources
+melt-sayhello.melt: $(melt_default_modules_list).modlis
+	@date +'(code_chunk say%YM%mhello #{printf("hello_from_MELT on %c pid %%d\n", (int) getpid());}#)' > $@
+#@ [+ (. (tpl-file-line))+]
+
+#@ [+ (. (tpl-file-line))+]
+melt-tiny-tests: melt-sayhello.melt melt-modules melt-sources melt-all-modules melt-all-sources
 # test that a helloworld can be translated
-	@date +'(code_chunk say%YM%mhello #{printf("hello_from_MELT on %c pid %%d\n", (int) getpid());}#)' > melt-sayhello.melt
 	@echo	$(MELTCCAPPLICATION1ARGS) \
-	     $(meltarg_arg)=$<  -frandom-seed=$(shell md5sum melt-sayhello.melt | cut -b-24) \
+	     $(meltarg_arg)=$<  -frandom-seed=$(shell md5sum $< | cut -b-24) \
 	     $(meltarg_module_path)=$(realpath melt-modules) \
 	     $(meltarg_source_path)=$(realpath melt-sources) \
-             $(meltarg_workdir)=melt-workdir $(meltarg_inhibitautobuild) \
-             $(meltarg_output)=melt-sayhello.c empty-file-for-melt.c > melt-sayhello.args-tmp
-	@mv melt-sayhello.args-tmp melt-sayhello.args
-	@echo -n melt-sayhello.args: ; cat melt-sayhello.args ; echo "***** doing " melt-sayhello
-	$(melt_make_cc1) @melt-sayhello.args
+       $(meltarg_workdir)=melt-workdir $(meltarg_inhibitautobuild) $(meltarg_bootstrapping) \
+       $(meltarg_output)=$(basename $<) empty-file-for-melt.c > $(basename $<).args-tmp
+	@mv $(basename $<).args-tmp $(basename $<).args
+	@echo -n $(basename $<).args: ; cat $(basename $<).args ; echo "***** doing " $(basename $<)
+	$(melt_make_cc1) @$(basename $<).args
 #@ [+ (. (tpl-file-line))+]