Skip to contentSkip to conversation

Build system clean generated source files in tests

PATCH In review Wenchao Xia 1 participant 2 messages Nov 29, 2012 – Dec 4, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Build system clean generated source files in tests

Currently .c files generated in ./tests are not deleted in make
clean. This introduce trouble that, once we made tests in source root directory, we can't do a succesfully build for tests in another out of tree directory, for that some file may miss the step to be generated. This patch fix it.

Steps to reproduce:
in root source directory:
1 ./configure --target-list=x86_64-softmmu
2 make check-report-unit.xml
3 make distclean && rm -rf *-linux-user *-softmmu
goto another directory:
4 configure
5 make check-report-unit.xml

---
 tests/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
tests/Makefile +1 -0
index b60f0fb..2c90138 100644
@@ -30,6 +30,7 @@ check-qtest-sparc-y = tests/m48t59-test$(EXESUF)
 check-qtest-sparc64-y = tests/m48t59-test$(EXESUF)
 
 GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h tests/test-qmp-commands.h
+GENERATED_SOURCES += tests/test-qapi-types.c tests/test-qapi-visit.c tests/test-qmp-marshal.c
 
 test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
 	tests/check-qlist.o tests/check-qfloat.o tests/check-qjson.o \
Signature · 1 line
1.7.1
#1 lore raw

Resent for that 1.3 have been released. I think this problem should
be fixed otherwise out of tree build fails strangely.

Quoted 33 lines

Currently .c files generated in ./tests are not deleted in make
clean. This introduce trouble that, once we made tests in source root directory, we can't do a succesfully build for tests in another out of tree directory, for that some file may miss the step to be generated. This patch fix it.

Steps to reproduce:
in root source directory:
1 ./configure --target-list=x86_64-softmmu
2 make check-report-unit.xml
3 make distclean && rm -rf *-linux-user *-softmmu
goto another directory:
4 configure
5 make check-report-unit.xml

---
  tests/Makefile |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
tests/Makefile +1 -0
index b60f0fb..2c90138 100644
@@ -30,6 +30,7 @@ check-qtest-sparc-y = tests/m48t59-test$(EXESUF)
  check-qtest-sparc64-y = tests/m48t59-test$(EXESUF)
 
  GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h tests/test-qmp-commands.h
+GENERATED_SOURCES += tests/test-qapi-types.c tests/test-qapi-visit.c tests/test-qmp-marshal.c
 
  test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
  	tests/check-qlist.o tests/check-qfloat.o tests/check-qjson.o \
Signature · 3 lines
Best Regards

Wenchao Xia