From 4a008047988954e8ab80c74ab18f4e7b2ba4d478 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 7 Apr 2011 15:25:44 +0000 Subject: Two minor changes, first off the c and cpp requires rules both ignore missing files and treat them as inputs that we just haven't generated yet. I think this is a better assumption overall and will prevent most files from dying on deps. Second, a change to the qt4 include overrides the normal exe rule and substitutes one that also includes all .h files in it's inputs, only to ignore them in the build profile at the last second. This means that all generated .h files will also be deleted. It's the best solution until I figure out a way to fix this in the build core. --- share/autoinclude/general-rules.bld | 4 ++-- share/include/qt4.bld | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/share/autoinclude/general-rules.bld b/share/autoinclude/general-rules.bld index 0e6c735..d568e11 100644 --- a/share/autoinclude/general-rules.bld +++ b/share/autoinclude/general-rules.bld @@ -86,7 +86,7 @@ rule "cpp" { input "*.cpp"; output INPUT.cppToObj(); - requires getMakeDeps("${CXX} ${CXXFLAGS} -M ${INPUT}"); + requires getMakeDeps("${CXX} ${CXXFLAGS} -M -MG ${INPUT}"); profile "build" { execute("${CXX} ${CXXFLAGS} -c -o ${OUTPUT} ${INPUT}", "g++"); @@ -98,7 +98,7 @@ rule "c" { input "*.c"; output INPUT.cToObj(); - requires getMakeDeps("${CC} ${CFLAGS} -M ${INPUT}"); + requires getMakeDeps("${CC} ${CFLAGS} -M -MG ${INPUT}"); profile "build" { execute("${CC} ${CFLAGS} -c -o ${OUTPUT} ${INPUT}"); diff --git a/share/include/qt4.bld b/share/include/qt4.bld index a5a7867..6d95ac8 100644 --- a/share/include/qt4.bld +++ b/share/include/qt4.bld @@ -151,3 +151,15 @@ rule "qt_moc" } } +rule "exe" +{ + input regex(".*\\.(h|o)"); + profile "build" + { + INPUT = INPUT.matches("*.o"); +// execute("echo ${INPUT}"); +// execute("echo ${MYIN}"); + execute("${CXX} -o ${OUTPUT} ${INPUT} ${LDFLAGS}"); + } +} + -- cgit v1.2.3