On 09.06.2012 10:02, Claus Klein wrote:
Hi Peter,

I agree, we need your/our changes at upstream!

I will switch to our github:

https://github.com/syntheticpp/ninja


In times of git there is no "our repository" any more.

You could simply fork martine/ninja and push you changes
into your fork. Then, when you think something should go
upstream, create a merge request.

You could track multiple repositories by using git remote,
for instance in my cmake dir it looks like this:

$ git remote -v
origin  git://cmake.org/cmake.git (fetch)
origin  git://cmake.org/cmake.git (push)
pcc     https://github.com/pcc/CMake.git (fetch)
pcc     https://github.com/pcc/CMake.git (push)
polrop  https://github.com/polrop/CMake.git (fetch)
polrop  https://github.com/polrop/CMake.git (push)
stage   g...@cmake.org:stage/cmake.git (fetch)
stage   g...@cmake.org:stage/cmake.git (push)
steveires       git://gitorious.org/~steveire/cmake/steveires-cmake.git (fetch)
steveires       git://gitorious.org/~steveire/cmake/steveires-cmake.git (push)
syntheticpp     g...@github.com:syntheticpp/CMake.git (fetch)
syntheticpp     g...@github.com:syntheticpp/CMake.git (push)


On little more about ninja bootstrap:
Original bootstrap.py generated target rule:
ninja -t clean
does a really distclean. The re2c generted files are removed too!

Yes, you have to checkout again. When you don't have changes "checkout -f"
is the fasted way.


To be save, I added a rule to build/update them if needed:

Mostly I use my cmake file. Their python scripts are a bit sub-optimal.


#####################################
set (RE2C_FOUND FALSE)
find_program (RE2C_EXECUTABLE "re2c")
if (RE2C_EXECUTABLE)
set (RE2C_FOUND TRUE)
set (RE2C_FLAGS -b -i --no-generation-date)

# build src/depfile_parser.cc: re2c src/depfile_parser.in.cc
# build src/lexer.cc: re2c src/lexer.in.cc
foreach(_in depfile_parser.in.cc lexer.in.cc)
string(REGEX REPLACE ".in.cc" ".cc" _out "${_in}")
message(STATUS "Generate re2c src/${_in} -o src/${_out}")

# CMake atrocity: if none of these OUTPUT files is used in a target in
# the current CMakeLists.txt file, the ADD_CUSTOM_COMMAND is plainly
# ignored and left out of the make files.
add_custom_command(OUTPUT ${srcdir}/${_out}
COMMAND ${RE2C_EXECUTABLE} ${${RE2C_FLAGS}} -o ${srcdir}/${_out} 
${srcdir}/${_in}
DEPENDS ${srcdir}/${_in}
)
endforeach()
endif (RE2C_EXECUTABLE)
########################################

claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja: no work to do.
claus-kleins-macbook-pro:build clausklein$ touch ../src/lexer.in.cc
claus-kleins-macbook-pro:build clausklein$ ninja -d explain
ninja explain: restat of output ../src/lexer.cc older than inputs
ninja explain: ../src/lexer.cc is dirty
ninja explain: ../src/lexer.cc is dirty
ninja explain: CMakeFiles/ninja_lib.dir/src/lexer.cc.o is dirty
ninja explain: libninja_lib.a is dirty
ninja explain: ninja is dirty
ninja explain: libninja_lib.a is dirty
[4/4] Linking CXX executable ninja
claus-kleins-macbook-pro:build clausklein$

//Regards
Claus


Nice, never tried -d explain.

Peter
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to