From 50f2d0ea76d7a3688beb38b7ca109bc8c09ff6e5 Mon Sep 17 00:00:00 2001 From: Oleg Semyonov Date: Thu, 12 May 2011 23:21:56 +0300 Subject: [PATCH] OP-483: cleanup: replace ';' by '&&' in top Makefile (shouldn't continue on error) On Windows cd doesn't mean that current directory is as expected since there is also current drive. So in some rare cases mkdir followed by cd doesn't change the directory which can result in Makefile overwrites by qmake, etc. So it is safer to replace ';' by '&&' but need to check if it still works on Windows under cmd or from Qt-Creator. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e7e0bea48..127d031f9 100644 --- a/Makefile +++ b/Makefile @@ -265,8 +265,8 @@ gcs_clean: openpilotgcs_clean .PHONY: openpilotgcs openpilotgcs: uavobjects_gcs $(V1) mkdir -p $(BUILD_DIR)/ground/$@ - $(V1) ( cd $(BUILD_DIR)/ground/$@ ; \ - $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) ; \ + $(V1) ( cd $(BUILD_DIR)/ground/$@ && \ + $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) && \ $(MAKE) -w ; \ ) @@ -290,8 +290,8 @@ openpilotgcs_clean: .PHONY: uavobjgenerator uavobjgenerator: $(V1) mkdir -p $(BUILD_DIR)/ground/$@ - $(V1) ( cd $(BUILD_DIR)/ground/$@ ; \ - $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro -spec $(QT_SPEC) -r CONFIG+=debug ; \ + $(V1) ( cd $(BUILD_DIR)/ground/$@ && \ + $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro -spec $(QT_SPEC) -r CONFIG+=debug && \ $(MAKE) --no-print-directory -w ; \ ) @@ -306,7 +306,7 @@ $(UAVOBJ_OUT_DIR): $(V1) mkdir -p $@ uavobjects_%: $(UAVOBJ_OUT_DIR) uavobjgenerator - $(V1) ( cd $(UAVOBJ_OUT_DIR) ; \ + $(V1) ( cd $(UAVOBJ_OUT_DIR) && \ $(UAVOBJGENERATOR) -$* $(UAVOBJ_XML_DIR) $(ROOT_DIR) ; \ )