From 08353ff03892365eebe8f77c19d069efd0846993 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Thu, 8 Sep 2011 14:19:12 +0200 Subject: [PATCH] Fix second build fail due to zrtp/cmake CMakeFileLists.txt was overwritten for each architecture target. CMake was then confused as the CMakeFileLists.txt was newer than the generated Makefile, cache. CMake would forget the options passed during generation of Makefile, leading to compilation of unwanted ccRrtp. --- submodules/build/builder-iphone-os.mk | 2 +- submodules/build/builders.d/zrtp.mk | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/submodules/build/builder-iphone-os.mk b/submodules/build/builder-iphone-os.mk index 02e216355..a5b0127fa 100644 --- a/submodules/build/builder-iphone-os.mk +++ b/submodules/build/builder-iphone-os.mk @@ -101,7 +101,7 @@ veryclean: veryclean-linphone clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-srtp clean-zrtpcpp clean-msilbc clean-libilbc clean-openssl clean-msamr cd $(LINPHONE_BUILD_DIR) && make clean -veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr +veryclean-linphone: veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-srtp veryclean-zrtpcpp veryclean-libgsm veryclean-msilbc veryclean-libilbc veryclean-openssl veryclean-msamr #-cd $(LINPHONE_BUILD_DIR) && make distclean -cd $(LINPHONE_SRC_DIR) && rm -f configure diff --git a/submodules/build/builders.d/zrtp.mk b/submodules/build/builders.d/zrtp.mk index 2dcc70ccf..83b323a03 100644 --- a/submodules/build/builders.d/zrtp.mk +++ b/submodules/build/builders.d/zrtp.mk @@ -1,8 +1,12 @@ +$(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker_target: $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker + cp $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt + touch $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker + + #I coudn't manage to crosscompile using only -D arguments to cmake #Thus the use of a toolchain file. TC = -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)build/iphone-toolchain.cmake$(tc_proc) -$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile: - cp $(BUILDER_SRC_DIR)/build/builders.d/zrtpcpp.CMakeLists.txt $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt +$(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker_target mkdir -p $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/\ && host_alias=$(host) . $(BUILDER_SRC_DIR)/build/$(config_site) \ @@ -13,7 +17,7 @@ ifeq ($(enable_zrtp),yes) build-zrtpcpp: $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile echo "Build ZRTP - prefix $(prefix)" - cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make && make install + cd $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir) && make VERBOSE=1 && make install else build-zrtpcpp: @@ -27,6 +31,7 @@ clean-makefile-zrtpcpp: clean-zrtpcpp -rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/Makefile -rm -f $(BUILDER_BUILD_DIR)/$(zrtpcpp_dir)/CMakeCache.txt - +veryclean-zrtpcpp: + -rm $(BUILDER_SRC_DIR)/$(zrtpcpp_dir)/CMakeLists.txt.tracker