From 28a42dade688c508247b441f0a843d1112df2868 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sun, 17 May 2015 14:06:27 +0100 Subject: [PATCH] OP-1853 Ground build tidy: Make consistent uavobjgenerator output dir. Because on windows its normally different for release and debug --- Makefile | 8 ++++---- ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro | 8 +------- ground/uavobjgenerator/uavobjgenerator.pro | 1 + 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 256bfff1b..cdeafcb72 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ else ifeq ($(UNAME), Darwin) UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/uavobjgenerator else ifeq ($(UNAME), Windows) QT_SPEC = win32-g++ - UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/$(GCS_BUILD_CONF)/uavobjgenerator.exe + UAVOBJGENERATOR = $(BUILD_DIR)/uavobjgenerator/uavobjgenerator.exe endif ############################## @@ -168,13 +168,13 @@ uavobjects: $(addprefix uavobjects_, $(UAVOBJ_TARGETS)) UAVOBJ_XML_DIR := $(ROOT_DIR)/shared/uavobjectdefinition UAVOBJ_OUT_DIR := $(BUILD_DIR)/uavobject-synthetics -uavobjects_%: $(UAVOBJGENERATOR) +uavobjects_%: uavobjgenerator @$(MKDIR) -p $(UAVOBJ_OUT_DIR)/$* $(V1) ( cd $(UAVOBJ_OUT_DIR)/$* && \ $(UAVOBJGENERATOR) -$* $(UAVOBJ_XML_DIR) $(ROOT_DIR) ; \ ) -uavobjects_test: $(UAVOBJGENERATOR) +uavobjects_test: uavobjgenerator $(V1) $(UAVOBJGENERATOR) -v $(UAVOBJ_XML_DIR) $(ROOT_DIR) uavobjects_clean: @@ -468,7 +468,7 @@ openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR) -spec $(QT_SPEC) -r CONFIG+=$(GCS_BUILD_CONF) CONFIG+=$(GCS_SILENT) $(GCS_QMAKE_OPTS) .PHONY: openpilotgcs -openpilotgcs: $(UAVOBJGENERATOR) $(OPENPILOTGCS_MAKEFILE) +openpilotgcs: uavobjgenerator $(OPENPILOTGCS_MAKEFILE) $(V1) $(MAKE) -w -C $(OPENPILOTGCS_DIR)/$(MAKE_DIR); .PHONY: openpilotgcs_clean diff --git a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro index 54ec84cce..ae575125d 100644 --- a/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro +++ b/ground/openpilotgcs/src/plugins/uavobjects/uavobjects.pro @@ -28,14 +28,8 @@ OTHER_FILES += UAVObjects.pluginspec UAVOBJ_XML_DIR = $${ROOT_DIR}/shared/uavobjectdefinition UAVOBJ_ROOT_DIR = $${ROOT_DIR} -CONFIG(debug, debug|release) { - BUILD_CONF = debug -} else { - BUILD_CONF = release -} - win32 { - UAVOBJGENERATOR = ../../../../uavobjgenerator/$${BUILD_CONF}/uavobjgenerator.exe + UAVOBJGENERATOR = ../../../../uavobjgenerator/uavobjgenerator.exe } else { UAVOBJGENERATOR = ../../../../uavobjgenerator/uavobjgenerator } diff --git a/ground/uavobjgenerator/uavobjgenerator.pro b/ground/uavobjgenerator/uavobjgenerator.pro index d3a06d92a..ae8c9fd25 100644 --- a/ground/uavobjgenerator/uavobjgenerator.pro +++ b/ground/uavobjgenerator/uavobjgenerator.pro @@ -12,6 +12,7 @@ TARGET = uavobjgenerator CONFIG += console CONFIG -= app_bundle TEMPLATE = app +DESTDIR = $$OUT_PWD # Set a consistent output dir on windows SOURCES += main.cpp \ uavobjectparser.cpp \ generators/generator_io.cpp \