From 4481015bdcf4b1f72d5b4c7de6084e11f28ff843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Mon, 31 Mar 2014 13:56:07 +0200 Subject: [PATCH] dmake: "make dmake" now also runs the binary after compilation. --- .travis.yml | 1 - Makefile | 3 +++ tools/dmake.cpp | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index be5556850..cbb0b279a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,6 @@ script: # check if Makefile needs to be regenerated - git clean -dfx - make dmake - - ./dmake # now, if dmake modified the makefile, return false! - git diff --exit-code diff --git a/Makefile b/Makefile index 4a7cf3738..cf13c21db 100644 --- a/Makefile +++ b/Makefile @@ -209,6 +209,8 @@ endif EXTOBJ += $(TINYXML) +.PHONY: dmake + ###### Targets @@ -228,6 +230,7 @@ check: all dmake: tools/dmake.cpp $(CXX) -std=c++0x -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib $(LDFLAGS) + ./dmake reduce: tools/reduce.cpp $(CXX) -std=c++0x -g -o reduce tools/reduce.cpp -Ilib -Iexternals/tinyxml lib/*.cpp externals/tinyxml/tinyxml2.cpp diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 35e96c809..d66d1bacf 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -365,6 +365,7 @@ int main(int argc, char **argv) makeExtObj(fout, externalfiles); + fout << ".PHONY: dmake\n\n"; fout << "\n###### Targets\n\n"; fout << "cppcheck: $(LIBOBJ) $(CLIOBJ) $(EXTOBJ)\n"; fout << "\t$(CXX) $(CPPFLAGS) $(CXXFLAGS) -std=c++0x -o cppcheck $(CLIOBJ) $(LIBOBJ) $(EXTOBJ) $(LIBS) $(LDFLAGS) $(RDYNAMIC)\n\n"; @@ -376,7 +377,8 @@ int main(int argc, char **argv) fout << "check:\tall\n"; fout << "\t./testrunner -g -q\n\n"; fout << "dmake:\ttools/dmake.cpp\n"; - fout << "\t$(CXX) -std=c++0x -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib $(LDFLAGS)\n\n"; + fout << "\t$(CXX) -std=c++0x -o dmake tools/dmake.cpp cli/filelister.cpp lib/path.cpp -Ilib $(LDFLAGS)\n"; + fout << "\t./dmake\n\n"; fout << "reduce:\ttools/reduce.cpp\n"; fout << "\t$(CXX) -std=c++0x -g -o reduce tools/reduce.cpp -Ilib -Iexternals/tinyxml lib/*.cpp externals/tinyxml/tinyxml2.cpp\n\n"; fout << "clean:\n";