From d89c0289565a662a378df6e3c05de42982ab1c9d Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 26 May 2010 09:59:52 +0000 Subject: Added kdevelop4 project file --- tools/mhmake/CMakeLists.txt | 49 +++++++++++++++++++++++++++++++++++++++++++++ tools/mhmake/genkdev4.sh | 12 +++++++++++ tools/mhmake/mhmake.kdev4 | 4 ++++ tools/mhmake/readme.txt | 17 +++++++++++++--- 4 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 tools/mhmake/CMakeLists.txt create mode 100755 tools/mhmake/genkdev4.sh create mode 100644 tools/mhmake/mhmake.kdev4 (limited to 'tools') diff --git a/tools/mhmake/CMakeLists.txt b/tools/mhmake/CMakeLists.txt new file mode 100644 index 000000000..7fb5c6c6f --- /dev/null +++ b/tools/mhmake/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 2.8) + +IF(CMAKE_BUILD_TYPE MATCHES "Release") +SET(PROGRAM_NAME mhmake) +ELSE(CMAKE_BUILD_TYPE MATCHES "Release") +SET(PROGRAM_NAME mhmake_dbg) +ENDIF(CMAKE_BUILD_TYPE MATCHES "Release") + +PROJECT(${PROGRAM_NAME}) + +SET( CMAKE_CXX_FLAGS_DEBUG "-D _DEBUG") + +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mhmakelexer.cpp ${CMAKE_CURRENT_BINARY_DIR}/mhmakelexer.h + COMMAND flex++ -8 -S${CMAKE_CURRENT_SOURCE_DIR}/src/flexskel.cc -H${CMAKE_CURRENT_SOURCE_DIR}/src/flexskel.h -h${CMAKE_CURRENT_BINARY_DIR}/mhmakelexer.h -otemp1234.456 ${CMAKE_CURRENT_SOURCE_DIR}/src/mhmakelexer.l + COMMAND echo '\#include \"stdafx.h\"' > ${CMAKE_CURRENT_BINARY_DIR}/mhmakelexer.cpp + COMMAND cat temp1234.456 >> ${CMAKE_CURRENT_BINARY_DIR}/mhmakelexer.cpp + COMMAND rm temp1234.456 + + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/mhmakelexer.l ${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.h +) +ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.cpp ${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.h + COMMAND bison++ -d -S${CMAKE_CURRENT_SOURCE_DIR}/src/bison.cc -H${CMAKE_CURRENT_SOURCE_DIR}/src/bison.h -h${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.h -otemp1234.456 ${CMAKE_CURRENT_SOURCE_DIR}/src/mhmakeparser.y + COMMAND echo '\#include \"stdafx.h\"' > ${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.cpp + COMMAND cat temp1234.456 >> ${CMAKE_CURRENT_BINARY_DIR}/mhmakeparser.cpp + COMMAND rm temp1234.456 + + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/mhmakeparser.y +) +INCLUDE_DIRECTORIES(src ${CMAKE_CURRENT_BINARY_DIR}) +LINK_LIBRARIES(/usr/lib/libpopt.a) + +ADD_EXECUTABLE(${PROGRAM_NAME} + mhmakeparser.cpp + mhmakelexer.cpp + src/mhmake.cpp + src/mhmakefileparser.cpp + src/util.cpp + src/functions.cpp + src/fileinfo.cpp + src/rule.cpp + src/md5.cpp + src/build.cpp + src/curdir.cpp + src/commandqueue.cpp + ) + +INSTALL_TARGETS( /bin ${PROGRAM_NAME} ) diff --git a/tools/mhmake/genkdev4.sh b/tools/mhmake/genkdev4.sh new file mode 100755 index 000000000..1acfe13b4 --- /dev/null +++ b/tools/mhmake/genkdev4.sh @@ -0,0 +1,12 @@ +mkdir build +cd build +cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release .. +cd .. +mkdir build.dbg +cd build.dbg +cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debug .. +cd .. +mkdir .kdev4 +echo [CMake] > .kdev4/mhmake.kdev4 +echo BuildDirs[\$e]=$PWD/build,$PWD/build.dbg >> .kdev4/mhmake.kdev4 + diff --git a/tools/mhmake/mhmake.kdev4 b/tools/mhmake/mhmake.kdev4 new file mode 100644 index 000000000..4eef88a1e --- /dev/null +++ b/tools/mhmake/mhmake.kdev4 @@ -0,0 +1,4 @@ +[Project] +Name=mhmake +Manager=KDevCMakeManager +VersionControl= diff --git a/tools/mhmake/readme.txt b/tools/mhmake/readme.txt index bfd8bd3e5..bee2372e0 100644 --- a/tools/mhmake/readme.txt +++ b/tools/mhmake/readme.txt @@ -1,15 +1,26 @@ -To build this tool you first need to install Visaul C++ Studio .NET 2003. +To build this tool you first need to install Visaul C++ Studio .NET 2003, +Visual Studio 2008 or Visual Studio 2010. -Open the mhmake.sln file in Visual Studio and compile for Debug and for +Open the mhmake.sln, mhmakevc6.sln or mhmakevc10.sln file in Visual Studio +depending on the version of Visual Studio and compile for Debug and for Release. 2 executables are generated by this process: - Release\mhmake.exe : gnu make compatible make program with some specific extension is make the build process faster. -- Debug\mhmake_dbg.exe : Has the same functionality but does extra +- Debug\mhmake_dbg.exe : Has the same functionality but does extra error checking on makefiles and has extra debugging options. This one is advised to be used when creating makefiles. When the makefiles are fully debugging mhmake.exe is a better choise because here the build process will be faster. mhmake.exe is more likely to crash when badly written makefiles are passed as input. +To build with kdevelop3 on linux +- Open mhmake.kdevelop and build configurations Debug and Optimized +- run 'make install' in the deubg and release directories (as root) + +To build with kdevelop4 on linux +- run genkdev4.sh +- open mhmake.kdev4 and build configuration build and build.dbg +- run 'make install' in the build and build.dbg directories (as root) + -- cgit v1.2.3