From 428bba0c0960ad0c686db149c4df2c81a25a7499 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 18 Mar 2015 12:56:57 +1300 Subject: [PATCH 01/11] OP-1792: make firmware_info.c depend on uavobjectdefition instead of FORCE so it isn't always updated --- make/firmware-defs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/firmware-defs.mk b/make/firmware-defs.mk index 5f1ed36ee..d184c0b05 100644 --- a/make/firmware-defs.mk +++ b/make/firmware-defs.mk @@ -136,7 +136,7 @@ endef define OPFW_TEMPLATE FORCE: -$(1).firmware_info.c: $(1) $(ROOT_DIR)/flight/templates/firmware_info.c.template FORCE +$(1).firmware_info.c: $(1) $(ROOT_DIR)/flight/templates/firmware_info.c.template $(ROOT_DIR)/shared/uavobjectdefinition @$(ECHO) $(MSG_FWINFO) $$(call toprel, $$@) $(V1) $(VERSION_INFO) \ --template=$(ROOT_DIR)/flight/templates/firmware_info.c.template \ From 4f50be6a4431811456298a66882f53bbc98bb16f Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 18 Mar 2015 12:58:06 +1300 Subject: [PATCH 02/11] OP-1792 Makefile: remove old Android stuff --- Makefile | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) diff --git a/Makefile b/Makefile index 97ff2d923..f387d96d5 100644 --- a/Makefile +++ b/Makefile @@ -531,49 +531,6 @@ uploader_clean: $(V1) [ ! -d "$(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)" ] || $(RM) -r "$(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)" -################################ -# -# Android GCS related components -# -################################ - -# Build the output directory for the Android GCS build -ANDROIDGCS_OUT_DIR := $(BUILD_DIR)/androidgcs -$(ANDROIDGCS_OUT_DIR): - $(V1) $(MKDIR) -p $@ - -# Build the asset directory for the android assets -ANDROIDGCS_ASSETS_DIR := $(ANDROIDGCS_OUT_DIR)/assets -$(ANDROIDGCS_ASSETS_DIR)/uavos: - $(V1) $(MKDIR) -p $@ - -ifeq ($(V), 1) - ANT_QUIET := - ANDROID_SILENT := -else - ANT_QUIET := -q - ANDROID_SILENT := -s -endif - -.PHONY: androidgcs -androidgcs: uavo-collections_java - $(V0) @$(ECHO) " ANDROID $(call toprel, $(ANDROIDGCS_OUT_DIR))" - $(V1) $(MKDIR) -p $(ANDROIDGCS_OUT_DIR) - $(V1) $(ANDROID) $(ANDROID_SILENT) update project \ - --target "Google Inc.:Google APIs:$(GOOGLE_API_VERSION)" \ - --name androidgcs \ - --path ./androidgcs - $(V1) $(ANT) -f ./androidgcs/build.xml \ - $(ANT_QUIET) \ - -Dout.dir="../$(call toprel, $(ANDROIDGCS_OUT_DIR)/bin)" \ - -Dgen.absolute.dir="$(ANDROIDGCS_OUT_DIR)/gen" \ - $(ANDROIDGCS_BUILD_CONF) - -.PHONY: androidgcs_clean -androidgcs_clean: - @$(ECHO) " CLEAN $(call toprel, $(ANDROIDGCS_OUT_DIR))" - $(V1) [ ! -d "$(ANDROIDGCS_OUT_DIR)" ] || $(RM) -r "$(ANDROIDGCS_OUT_DIR)" - # We want to take snapshots of the UAVOs at each point that they change # to allow the GCS to be compatible with as many versions as possible. # We always include a pseudo collection called "srctree" which represents @@ -928,7 +885,6 @@ help: @$(ECHO) " openocd_install - Install the OpenOCD JTAG daemon" @$(ECHO) " stm32flash_install - Install the stm32flash tool for unbricking F1-based boards" @$(ECHO) " dfuutil_install - Install the dfu-util tool for unbricking F4-based boards" - @$(ECHO) " android_sdk_install - Install the Android SDK tools" @$(ECHO) " Install all available tools:" @$(ECHO) " all_sdk_install - Install all of above (platform-dependent)" @$(ECHO) " build_sdk_install - Install only essential for build tools (platform-dependent)" @@ -1014,12 +970,6 @@ help: @$(ECHO) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))" @$(ECHO) @$(ECHO) - @$(ECHO) " [AndroidGCS]" - @$(ECHO) " androidgcs - Build the Android Ground Control System (GCS) application" - @$(ECHO) " androidgcs_install - Use ADB to install the Android GCS application" - @$(ECHO) " androidgcs_run - Run the Android GCS application" - @$(ECHO) " androidgcs_clean - Remove the Android GCS application" - @$(ECHO) @$(ECHO) " [UAVObjects]" @$(ECHO) " uavobjects - Generate source files from the UAVObject definition XML files" @$(ECHO) " uavobjects_test - Parse xml-files - check for valid, duplicate ObjId's, ..." From 3a08642b4080575e22bf0e01dfb4e56eba83c062 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 25 Mar 2015 09:27:00 +1300 Subject: [PATCH 03/11] OP-1792 Makefile tidy: Fix up the 'copydata.pro's to depend on FORCE, not be FORCE, and be aux template, not subdirs template. --- ground/openpilotgcs/copydata.pro | 5 ++-- ground/openpilotgcs/share/copydata.pro | 26 +++++++++++++++++++ ground/openpilotgcs/share/share.pro | 25 ++---------------- .../src/libs/sdlgamepad/copydata.pro | 6 ++--- .../src/plugins/hitl/aerosimrc/src/plugin.pro | 3 ++- .../uavobject-synthetics.pro | 5 ++-- 6 files changed, 38 insertions(+), 32 deletions(-) create mode 100644 ground/openpilotgcs/share/copydata.pro diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro index 3ececc457..bf9d7b4d7 100644 --- a/ground/openpilotgcs/copydata.pro +++ b/ground/openpilotgcs/copydata.pro @@ -1,6 +1,6 @@ include(openpilotgcs.pri) -TEMPLATE = subdirs +TEMPLATE = aux # Copy Qt runtime libraries into the build directory (to run or package) equals(copyqt, 1) { @@ -26,8 +26,9 @@ equals(copyqt, 1) { data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline() } - data_copy.target = FORCE + data_copy.depends = FORCE QMAKE_EXTRA_TARGETS += data_copy + PRE_TARGETDEPS += data_copy linux { diff --git a/ground/openpilotgcs/share/copydata.pro b/ground/openpilotgcs/share/copydata.pro new file mode 100644 index 000000000..2b3a89b6e --- /dev/null +++ b/ground/openpilotgcs/share/copydata.pro @@ -0,0 +1,26 @@ +include(../openpilotgcs.pri) + +TEMPLATE = aux + +DATACOLLECTIONS = cloudconfig default_configurations dials models pfd sounds diagrams mapicons stylesheets + +equals(copydata, 1) { + for(dir, DATACOLLECTIONS) { + exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) { + # Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used + # reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator). + # So undocumented QMAKE_SH variable is used to find out the real environment. + !isEmpty(QMAKE_SH) { + # sh environment (including Windows bash) + data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() + data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline() + } else { + # native Windows cmd environment + data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() + } + } + } + data_copy.depends = FORCE + QMAKE_EXTRA_TARGETS += data_copy + PRE_TARGETDEPS += data_copy +} diff --git a/ground/openpilotgcs/share/share.pro b/ground/openpilotgcs/share/share.pro index 7a4fe575a..c4d845b95 100644 --- a/ground/openpilotgcs/share/share.pro +++ b/ground/openpilotgcs/share/share.pro @@ -1,26 +1,5 @@ -include(../openpilotgcs.pri) - TEMPLATE = subdirs -SUBDIRS = openpilotgcs/translations -DATACOLLECTIONS = cloudconfig default_configurations dials models pfd sounds diagrams mapicons stylesheets +SUBDIRS = openpilotgcs/translations copydata -equals(copydata, 1) { - for(dir, DATACOLLECTIONS) { - exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) { - # Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used - # reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator). - # So undocumented QMAKE_SH variable is used to find out the real environment. - !isEmpty(QMAKE_SH) { - # sh environment (including Windows bash) - data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() - data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline() - } else { - # native Windows cmd environment - data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() - } - } - } - data_copy.target = FORCE - QMAKE_EXTRA_TARGETS += data_copy -} +copydata.file = copydata.pro diff --git a/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro b/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro index 4fa7cb219..91cc5292c 100644 --- a/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro +++ b/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro @@ -8,11 +8,9 @@ equals(copydata, 1) { data_copy.commands += $(COPY_FILE) $$targetPath(\"$${SDL_DIR}/bin/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() } - # add make target - POST_TARGETDEPS += copydata - - data_copy.target = copydata + data_copy.depends = FORCE QMAKE_EXTRA_TARGETS += data_copy + PRE_TARGETDEPS += data_copy } } diff --git a/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro b/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro index dab7ba70a..dc809e67d 100644 --- a/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro +++ b/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro @@ -65,7 +65,8 @@ equals(copydata, 1) { # data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(QTMINGW)/$$dll\") $$targetPath(\"$$SIM_DIR/$$dll\") $$addNewline() #} - data_copy.target = FORCE + data_copy.depends = FORCE QMAKE_EXTRA_TARGETS += data_copy + PRE_TARGETDEPS += data_copy } } diff --git a/ground/uavobject-synthetics/uavobject-synthetics.pro b/ground/uavobject-synthetics/uavobject-synthetics.pro index 1f974ae80..85e53d139 100644 --- a/ground/uavobject-synthetics/uavobject-synthetics.pro +++ b/ground/uavobject-synthetics/uavobject-synthetics.pro @@ -3,7 +3,7 @@ # Copyright (c) 2009-2013, The OpenPilot Team, http://www.openpilot.org # -TEMPLATE = subdirs +TEMPLATE = aux # Some handy defines defineReplace(targetPath) { @@ -64,5 +64,6 @@ win32 { uavobjects.commands += -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r $$addNewline() } -uavobjects.target = FORCE +uavobjects.depends = FORCE QMAKE_EXTRA_TARGETS += uavobjects +PRE_TARGETDEPS += uavobjects From 199ee15d84d02270ba999eb9ee4ea4558cc9a343 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 1 Apr 2015 09:19:09 +1300 Subject: [PATCH 04/11] OP-1792 makefile tidy: removed unneeded quotes for OPENSSL that break copydata makefile --- make/tools.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/tools.mk b/make/tools.mk index fb7ff75b3..3dc0c28cd 100644 --- a/make/tools.mk +++ b/make/tools.mk @@ -776,8 +776,8 @@ ifeq ($(UNAME), Windows) $(eval $(call TOOL_INSTALL_TEMPLATE,openssl,$(OPENSSL_DIR),$(OPENSSL_URL),,$(notdir $(OPENSSL_URL)))) ifeq ($(shell [ -d "$(OPENSSL_DIR)" ] && $(ECHO) "exists"), exists) - export OPENSSL := "$(OPENSSL_DIR)/bin/openssl" - export OPENSSL_DIR := "$(OPENSSL_DIR)" + export OPENSSL := $(OPENSSL_DIR)/bin/openssl + export OPENSSL_DIR else # not installed, hope it's in the path... # $(info $(EMPTY) WARNING $(call toprel, $(OPENSSL_DIR)) not found (make openssl_install), using system PATH) From af0696048223c0113245983dec4d7623fba2791a Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 25 Mar 2015 14:46:52 +1300 Subject: [PATCH 05/11] OP-1792 Makefile tidy: set dependencies for copydata by using new functions addCopyFileTarget and addCopyDirTarget --- ground/openpilotgcs/copydata.pro | 128 +++++++----------- ground/openpilotgcs/openpilotgcs.pri | 51 +++++++ ground/openpilotgcs/share/copydata.pro | 15 +- .../src/libs/sdlgamepad/copydata.pro | 8 +- .../src/plugins/hitl/aerosimrc/src/plugin.pro | 12 +- 5 files changed, 102 insertions(+), 112 deletions(-) diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro index bf9d7b4d7..94482e4c2 100644 --- a/ground/openpilotgcs/copydata.pro +++ b/ground/openpilotgcs/copydata.pro @@ -4,34 +4,7 @@ TEMPLATE = aux # Copy Qt runtime libraries into the build directory (to run or package) equals(copyqt, 1) { - - # Copy QtQuick2 complete directories - # Some of these directories have a lot of files - # Easier to copy everything - QT_QUICK2_DIRS = QtQuick/Controls \ - QtQuick/Dialogs \ - QtQuick/Layouts \ - QtQuick/LocalStorage \ - QtQuick/Particles.2 \ - QtQuick/PrivateWidgets \ - QtQuick/Window.2 \ - QtQuick/XmlListModel \ - QtQuick.2 - - # create QtQuick directory - data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_QML_PATH/QtQuick\") $$addNewline() - - for(dir, QT_QUICK2_DIRS) { - data_copy.commands += @rm -rf $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline() - data_copy.commands += $(COPY_DIR) $$targetPath(\"$$[QT_INSTALL_QML]/$$dir\") $$targetPath(\"$$GCS_QT_QML_PATH/$$dir\") $$addNewline() - } - - data_copy.depends = FORCE - QMAKE_EXTRA_TARGETS += data_copy - PRE_TARGETDEPS += data_copy - linux { - QT_LIBS = libQt5Core.so.5 \ libQt5Gui.so.5 \ libQt5Widgets.so.5 \ @@ -57,35 +30,21 @@ equals(copyqt, 1) { libicui18n.so.53 \ libicuuc.so.53 \ libicudata.so.53 - - data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_LIBRARY_PATH\") $$addNewline() for(lib, QT_LIBS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_LIBS]/$$lib\") $$targetPath(\"$$GCS_QT_LIBRARY_PATH/$$lib\") $$addNewline() + addCopyFileTarget($${lib},$$[QT_INSTALL_LIBS],$${GCS_QT_LIBRARY_PATH}) } - # create Qt plugin directories - QT_PLUGIN_DIRS = iconengines \ - imageformats \ - platforms \ - mediaservice \ - sqldrivers - for(dir, QT_PLUGIN_DIRS) { - data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_QT_PLUGINS_PATH/$$dir\") $$addNewline() - } - QT_PLUGIN_LIBS = iconengines/libqsvgicon.so \ - imageformats/libqgif.so \ - imageformats/libqico.so \ - imageformats/libqjpeg.so \ - imageformats/libqmng.so \ - imageformats/libqsvg.so \ - imageformats/libqtiff.so \ - mediaservice/libgstaudiodecoder.so \ - mediaservice/libgstmediaplayer.so \ - platforms/libqxcb.so \ - sqldrivers/libqsqlite.so - for(lib, QT_PLUGIN_LIBS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/$$lib\") $$targetPath(\"$$GCS_QT_PLUGINS_PATH/$$lib\") $$addNewline() - } + QT_PLUGINS = iconengines/libqsvgicon.so \ + imageformats/libqgif.so \ + imageformats/libqico.so \ + imageformats/libqjpeg.so \ + imageformats/libqmng.so \ + imageformats/libqsvg.so \ + imageformats/libqtiff.so \ + mediaservice/libgstaudiodecoder.so \ + mediaservice/libgstmediaplayer.so \ + platforms/libqxcb.so \ + sqldrivers/libqsqlite.so } win32 { @@ -121,33 +80,7 @@ equals(copyqt, 1) { libstdc++-6.dll \ libwinpthread-1.dll for(dll, QT_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() - } - - # create Qt plugin directories - QT_PLUGIN_DIRS = iconengines \ - imageformats \ - platforms \ - mediaservice \ - sqldrivers \ - opengl32_32 - for(dir, QT_PLUGIN_DIRS) { - data_copy.commands += -@$(MKDIR) $$targetPath(\"$$GCS_APP_PATH/$$dir\") $$addNewline() - } - - # copy Qt plugin DLLs - QT_PLUGIN_DLLS = iconengines/qsvgicon$${DS}.dll \ - imageformats/qgif$${DS}.dll \ - imageformats/qico$${DS}.dll \ - imageformats/qjpeg$${DS}.dll \ - imageformats/qmng$${DS}.dll \ - imageformats/qsvg$${DS}.dll \ - imageformats/qtiff$${DS}.dll \ - platforms/qwindows$${DS}.dll \ - mediaservice/dsengine$${DS}.dll \ - sqldrivers/qsqlite$${DS}.dll - for(dll, QT_PLUGIN_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_PLUGINS]/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${GCS_APP_PATH}) } # copy OpenSSL DLLs @@ -155,14 +88,45 @@ equals(copyqt, 1) { ssleay32.dll \ libeay32.dll for(dll, OPENSSL_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$${OPENSSL_DIR}/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() + addCopyFileTarget($${dll},$${OPENSSL_DIR},$${GCS_APP_PATH}) } # copy OpenGL DLL OPENGL_DLLS = \ opengl32_32/opengl32.dll for(dll, OPENGL_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$${MESAWIN_DIR}/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() + addCopyFileTarget($${dll},$${MESAWIN_DIR},$${GCS_APP_PATH}) } + + QT_PLUGINS = iconengines/qsvgicon$${DS}.dll \ + imageformats/qgif$${DS}.dll \ + imageformats/qico$${DS}.dll \ + imageformats/qjpeg$${DS}.dll \ + imageformats/qmng$${DS}.dll \ + imageformats/qsvg$${DS}.dll \ + imageformats/qtiff$${DS}.dll \ + platforms/qwindows$${DS}.dll \ + mediaservice/dsengine$${DS}.dll \ + sqldrivers/qsqlite$${DS}.dll + } + + for(plugin, QT_PLUGINS) { + addCopyFileTarget($${plugin},$$[QT_INSTALL_PLUGINS],$${GCS_QT_PLUGINS_PATH}) + } + + # Copy QtQuick2 complete directories + # Some of these directories have a lot of files + # Easier to copy everything + QT_QUICK2_DIRS = QtQuick/Controls \ + QtQuick/Dialogs \ + QtQuick/Layouts \ + QtQuick/LocalStorage \ + QtQuick/Particles.2 \ + QtQuick/PrivateWidgets \ + QtQuick/Window.2 \ + QtQuick/XmlListModel \ + QtQuick.2 + for(dir, QT_QUICK2_DIRS) { + addCopyDirTarget($${dir},$$[QT_INSTALL_QML],$${GCS_QT_QML_PATH}) } } diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index cbf44dd75..b09693eaf 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -32,6 +32,55 @@ defineReplace(qtLibraryName) { return($$RET) } +defineTest(addCopyFileTarget) { + file = $$1 + src = $$2/$$1 + dest = $$3/$$1 + + $${file}.target = $$dest + $${file}.depends = $$src + + # create directory. Better would be an order only dependency + $${file}.commands = -@$(MKDIR) \"$$targetPath($$dirname(dest))\" $$addNewline() + $${file}.commands += $(COPY_FILE) \"$$targetPath($$src)\" \"$$targetPath($$dest)\" + + QMAKE_EXTRA_TARGETS += $$file + POST_TARGETDEPS += $$eval($${file}.target) + + export($${file}.target) + export($${file}.depends) + export($${file}.commands) + export(QMAKE_EXTRA_TARGETS) + export(POST_TARGETDEPS) + + return(true) +} + +defineTest(addCopyDirTarget) { + dir = $$1 + src = $$2/$$1 + dest = $$3/$$1 + + $${dir}.target = $$dest + $${dir}.depends = $$src + + $${dir}.commands = @rm -rf \"$$targetPath($$dest)\" $$addNewline() + # create directory. Better would be an order only dependency + $${dir}.commands += -@$(MKDIR) \"$$targetPath($$dirname(dest))\" $$addNewline() + $${dir}.commands += $(COPY_DIR) \"$$targetPath($$src)\" \"$$targetPath($$dest)\" + + QMAKE_EXTRA_TARGETS += $$dir + POST_TARGETDEPS += $$eval($${dir}.target) + + export($${dir}.target) + export($${dir}.depends) + export($${dir}.commands) + export(QMAKE_EXTRA_TARGETS) + export(POST_TARGETDEPS) + + return(true) +} + # For use in custom compilers which just copy files win32:i_flag = i defineReplace(stripSrcDir) { @@ -119,6 +168,8 @@ macx { contains(TEMPLATE, vc.*)|contains(TEMPLATE_PREFIX, vc):vcproj = 1 GCS_APP_TARGET = openpilotgcs + + GCS_QT_PLUGINS_PATH = $$GCS_APP_PATH GCS_QT_QML_PATH = $$GCS_APP_PATH copyqt = $$copydata diff --git a/ground/openpilotgcs/share/copydata.pro b/ground/openpilotgcs/share/copydata.pro index 2b3a89b6e..b9c2a1875 100644 --- a/ground/openpilotgcs/share/copydata.pro +++ b/ground/openpilotgcs/share/copydata.pro @@ -7,20 +7,7 @@ DATACOLLECTIONS = cloudconfig default_configurations dials models pfd sounds dia equals(copydata, 1) { for(dir, DATACOLLECTIONS) { exists($$GCS_SOURCE_TREE/share/openpilotgcs/$$dir) { - # Qt make macros (CHK_DIR_EXISTS, COPY_DIR, etc) have different syntax. They cannot be used - # reliably to copy subdirectories in two different Windows environments (bash and cmd/QtCreator). - # So undocumented QMAKE_SH variable is used to find out the real environment. - !isEmpty(QMAKE_SH) { - # sh environment (including Windows bash) - data_copy.commands += $(MKDIR) $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() - data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/\") $$addNewline() - } else { - # native Windows cmd environment - data_copy.commands += $(COPY_DIR) $$targetPath(\"$$GCS_SOURCE_TREE/share/openpilotgcs/$$dir\") $$targetPath(\"$$GCS_DATA_PATH/$$dir\") $$addNewline() - } + addCopyDirTarget($$dir, $$GCS_SOURCE_TREE/share/openpilotgcs, $$GCS_DATA_PATH) } } - data_copy.depends = FORCE - QMAKE_EXTRA_TARGETS += data_copy - PRE_TARGETDEPS += data_copy } diff --git a/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro b/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro index 91cc5292c..af9cecbff 100644 --- a/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro +++ b/ground/openpilotgcs/src/libs/sdlgamepad/copydata.pro @@ -1,16 +1,10 @@ equals(copydata, 1) { - win32 { # copy SDL DLL SDL_DLLS = \ SDL.dll for(dll, SDL_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$${SDL_DIR}/bin/$$dll\") $$targetPath(\"$$GCS_APP_PATH/$$dll\") $$addNewline() + addCopyFileTarget($${dll},$${SDL_DIR}/bin,$${GCS_APP_PATH}) } - - data_copy.depends = FORCE - QMAKE_EXTRA_TARGETS += data_copy - PRE_TARGETDEPS += data_copy } - } diff --git a/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro b/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro index dc809e67d..5f4c57579 100644 --- a/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro +++ b/ground/openpilotgcs/src/plugins/hitl/aerosimrc/src/plugin.pro @@ -35,8 +35,6 @@ equals(copydata, 1) { # Windows release only win32:CONFIG(release, debug|release) { - data_copy.commands += -@$(MKDIR) $$targetPath(\"$$PLUGIN_DIR\") $$addNewline() - # resources and sample configuration PLUGIN_RESOURCES = \ cc_off.tga \ @@ -46,7 +44,7 @@ equals(copydata, 1) { cc_plugin.ini \ plugin.txt for(res, PLUGIN_RESOURCES) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$RES_DIR/$$res\") $$targetPath(\"$$PLUGIN_DIR/$$res\") $$addNewline() + addCopyFileTarget($${res},$${RES_DIR},$${PLUGIN_DIR}) } # Qt DLLs @@ -54,7 +52,7 @@ equals(copydata, 1) { Qt5Core.dll \ Qt5Network.dll for(dll, QT_DLLS) { - data_copy.commands += $(COPY_FILE) $$targetPath(\"$$[QT_INSTALL_BINS]/$$dll\") $$targetPath(\"$$SIM_DIR/$$dll\") $$addNewline() + addCopyFileTarget($${dll},$$[QT_INSTALL_BINS],$${SIM_DIR}) } # MinGW DLLs @@ -62,11 +60,7 @@ equals(copydata, 1) { # libgcc_s_dw2-1.dll \ # mingwm10.dll #for(dll, MINGW_DLLS) { - # data_copy.commands += $(COPY_FILE) $$targetPath(\"$$(QTMINGW)/$$dll\") $$targetPath(\"$$SIM_DIR/$$dll\") $$addNewline() + # addCopyFileTarget($${dll},$$(QTMINGW),$${SIM_DIR}) #} - - data_copy.depends = FORCE - QMAKE_EXTRA_TARGETS += data_copy - PRE_TARGETDEPS += data_copy } } From 5ea8a990df7e971816406aec6627eecdf09aa2a5 Mon Sep 17 00:00:00 2001 From: James Duley Date: Tue, 31 Mar 2015 18:59:21 +1300 Subject: [PATCH 06/11] OP-1792 Makefile tidy: removed repeated Qt5OpenGL.dll --- ground/openpilotgcs/copydata.pro | 1 - 1 file changed, 1 deletion(-) diff --git a/ground/openpilotgcs/copydata.pro b/ground/openpilotgcs/copydata.pro index 94482e4c2..eaf91ee08 100644 --- a/ground/openpilotgcs/copydata.pro +++ b/ground/openpilotgcs/copydata.pro @@ -66,7 +66,6 @@ equals(copyqt, 1) { Qt5Script$${DS}.dll \ Qt5Concurrent$${DS}.dll \ Qt5PrintSupport$${DS}.dll \ - Qt5OpenGL$${DS}.dll \ Qt5SerialPort$${DS}.dll \ Qt5Multimedia$${DS}.dll \ Qt5MultimediaWidgets$${DS}.dll \ From ccdd8e226311ddbb6353fdf4ecc1550f3fcdc468 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 1 Apr 2015 10:33:34 +1300 Subject: [PATCH 07/11] OP-1667 removed old firmware line from windows package --- package/winx86/openpilotgcs.nsi | 1 - 1 file changed, 1 deletion(-) diff --git a/package/winx86/openpilotgcs.nsi b/package/winx86/openpilotgcs.nsi index ab8534742..844028159 100644 --- a/package/winx86/openpilotgcs.nsi +++ b/package/winx86/openpilotgcs.nsi @@ -316,7 +316,6 @@ SectionEnd !insertmacro MUI_DESCRIPTION_TEXT ${InSecResources} $(DESC_InSecResources) !insertmacro MUI_DESCRIPTION_TEXT ${InSecSounds} $(DESC_InSecSounds) !insertmacro MUI_DESCRIPTION_TEXT ${InSecLocalization} $(DESC_InSecLocalization) - !insertmacro MUI_DESCRIPTION_TEXT ${InSecFirmware} $(DESC_InSecFirmware) !insertmacro MUI_DESCRIPTION_TEXT ${InSecUtilities} $(DESC_InSecUtilities) !insertmacro MUI_DESCRIPTION_TEXT ${InSecDrivers} $(DESC_InSecDrivers) !insertmacro MUI_DESCRIPTION_TEXT ${InSecInstallDrivers} $(DESC_InSecInstallDrivers) From 68e6231ba13310600120effd80a1c341ac899e92 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 1 Apr 2015 11:08:41 +1300 Subject: [PATCH 08/11] OP-1792 Makefile tidy: removed incorrect alignment space --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f387d96d5..0622cab77 100644 --- a/Makefile +++ b/Makefile @@ -225,7 +225,7 @@ osd_short := 'osd ' revoproto_short := 'revp' simposix_short := 'posx' discoveryf4bare_short := 'df4b' -gpsplatinum_short := 'gps9 ' +gpsplatinum_short := 'gps9' # SimPosix only builds on Linux so drop it from the list for # all other platforms. From 2c241da6391b7092fff50a133e21c255bed36393 Mon Sep 17 00:00:00 2001 From: James Duley Date: Wed, 1 Apr 2015 15:06:04 +1300 Subject: [PATCH 09/11] OP-1792 Makefile tidy: Create a rule for all directories in Makefile --- Makefile | 83 +++++++++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 43 deletions(-) diff --git a/Makefile b/Makefile index 0622cab77..ca5c0c88b 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,8 @@ export BUILD_DIR := $(ROOT_DIR)/build export PACKAGE_DIR := $(ROOT_DIR)/build/package export DIST_DIR := $(ROOT_DIR)/build/dist +DIRS = $(DL_DIR) $(TOOLS_DIR) $(BUILD_DIR) $(PACKAGE_DIR) $(DIST_DIR) + # Set up default build configurations (debug | release) GCS_BUILD_CONF := release UAVOGEN_BUILD_CONF := release @@ -140,20 +142,6 @@ all_clean: .PONY: clean clean: all_clean -$(DL_DIR): - $(MKDIR) -p $@ - -$(TOOLS_DIR): - $(MKDIR) -p $@ - -$(BUILD_DIR): - $(MKDIR) -p $@ - -$(PACKAGE_DIR): - $(MKDIR) -p $@ - -$(DIST_DIR): - $(MKDIR) -p $@ ############################## # @@ -167,10 +155,12 @@ else UAVOGEN_SILENT := silent endif +UAVOBJGENERATOR_DIR = $(BUILD_DIR)/uavobjgenerator +DIRS += $(UAVOBJGENERATOR_DIR) + .PHONY: uavobjgenerator -uavobjgenerator: - $(V1) $(MKDIR) -p $(BUILD_DIR)/$@ - $(V1) ( cd $(BUILD_DIR)/$@ && \ +uavobjgenerator: | $(UAVOBJGENERATOR_DIR) + $(V1) ( cd $(UAVOBJGENERATOR_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/uavobjgenerator/uavobjgenerator.pro -spec $(QT_SPEC) -r CONFIG+="$(UAVOGEN_BUILD_CONF) $(UAVOGEN_SILENT)" && \ $(MAKE) --no-print-directory -w ; \ ) @@ -183,8 +173,7 @@ uavobjects: $(addprefix uavobjects_, $(UAVOBJ_TARGETS)) UAVOBJ_XML_DIR := $(ROOT_DIR)/shared/uavobjectdefinition UAVOBJ_OUT_DIR := $(BUILD_DIR)/uavobject-synthetics -$(UAVOBJ_OUT_DIR): - $(V1) $(MKDIR) -p $@ +DIRS += $(UAVOBJ_OUT_DIR) uavobjects_%: $(UAVOBJ_OUT_DIR) uavobjgenerator $(V1) ( cd $(UAVOBJ_OUT_DIR) && \ @@ -214,6 +203,8 @@ export OPUAVTALK := $(ROOT_DIR)/flight/uavtalk export OPUAVSYNTHDIR := $(BUILD_DIR)/uavobject-synthetics/flight export OPGCSSYNTHDIR := $(BUILD_DIR)/openpilotgcs-synthetics +DIRS += $(OPGCSSYNTHDIR) + # Define supported board lists ALL_BOARDS := coptercontrol oplinkmini revolution osd revoproto simposix discoveryf4bare gpsplatinum @@ -474,11 +465,13 @@ endif .PHONY: openpilotgcs openpilotgcs: uavobjects_gcs openpilotgcs_qmake openpilotgcs_make +OPENPILOTGCS_DIR := $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) +DIRS += $(OPENPILOTGCS_DIR) + .PHONY: openpilotgcs_qmake -openpilotgcs_qmake: +openpilotgcs_qmake: | $(OPENPILOTGCS_DIR) ifeq ($(QMAKE_SKIP),) - $(V1) $(MKDIR) -p $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) - $(V1) ( cd $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) && \ + $(V1) ( cd $(OPENPILOTGCS_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+="$(GCS_BUILD_CONF) $(GCS_SILENT)" $(GCS_QMAKE_OPTS) \ ) else @@ -487,15 +480,12 @@ endif .PHONY: openpilotgcs_make openpilotgcs_make: - $(V1) $(MKDIR) -p $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) - $(V1) ( cd $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)/$(MAKE_DIR) && \ - $(MAKE) -w ; \ - ) + $(V1) $(MAKE) -w -C $(OPENPILOTGCS_DIR)/$(MAKE_DIR); .PHONY: openpilotgcs_clean openpilotgcs_clean: - @$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF))" - $(V1) [ ! -d "$(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)" ] || $(RM) -r "$(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF)" + @$(ECHO) " CLEAN $(call toprel, $(OPENPILOTGCS_DIR))" + $(V1) [ ! -d "$(OPENPILOTGCS_DIR)" ] || $(RM) -r "$(OPENPILOTGCS_DIR)" ################################ # @@ -507,11 +497,13 @@ openpilotgcs_clean: .PHONY: uploader uploader: uploader_qmake uploader_make +UPLOADER_DIR := $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF) +DIRS += $(UPLOADER_DIR) + .PHONY: uploader_qmake -uploader_qmake: +uploader_qmake: | $(UPLOADER_DIR) ifeq ($(QMAKE_SKIP),) - $(V1) $(MKDIR) -p $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF) - $(V1) ( cd $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF) && \ + $(V1) ( cd $(UPLOADER_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/src/experimental/USB_UPLOAD_TOOL/upload.pro -spec $(QT_SPEC) -r CONFIG+="$(GCS_BUILD_CONF) $(GCS_SILENT)" $(GCS_QMAKE_OPTS) \ ) else @@ -520,15 +512,12 @@ endif .PHONY: uploader_make uploader_make: - $(V1) $(MKDIR) -p $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF) - $(V1) ( cd $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)/$(MAKE_DIR) && \ - $(MAKE) -w ; \ - ) + $(V1) $(MAKE) -w -C $(UPLOADER_DIR) .PHONY: uploader_clean uploader_clean: - @$(ECHO) " CLEAN $(call toprel, $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF))" - $(V1) [ ! -d "$(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)" ] || $(RM) -r "$(BUILD_DIR)/uploader_$(GCS_BUILD_CONF)" + @$(ECHO) " CLEAN $(call toprel, $(UPLOADER_DIR))" + $(V1) [ ! -d "$(UPLOADER_DIR)" ] || $(RM) -r "$(UPLOADER_DIR)" # We want to take snapshots of the UAVOs at each point that they change @@ -652,8 +641,7 @@ ALL_UNITTESTS := logfs math lednotification # Build the directory for the unit tests UT_OUT_DIR := $(BUILD_DIR)/unit_tests -$(UT_OUT_DIR): - $(V1) $(MKDIR) -p $@ +DIRS += $(UT_OUT_DIR) .PHONY: all_ut all_ut: $(addsuffix _elf, $(addprefix ut_, $(ALL_UNITTESTS))) @@ -728,9 +716,8 @@ OPFW_CONTENTS := \ .PHONY: opfw_resource opfw_resource: $(OPFW_RESOURCE) -$(OPFW_RESOURCE): $(FW_TARGETS) +$(OPFW_RESOURCE): $(FW_TARGETS) | $(OPGCSSYNTHDIR) @$(ECHO) Generating OPFW resource file $(call toprel, $@) - $(V1) $(MKDIR) -p $(dir $@) $(V1) $(ECHO) $(QUOTE)$(OPFW_CONTENTS)$(QUOTE) > $@ # If opfw_resource or all firmware are requested, GCS should depend on the resource @@ -821,9 +808,8 @@ docs_all_clean: ############################## .PHONY: build-info -build-info: +build-info: | $(BUILD_DIR) @$(ECHO) " BUILD-INFO $(call toprel, $(BUILD_DIR)/$@.txt)" - $(V1) $(MKDIR) -p $(BUILD_DIR) $(V1) $(VERSION_INFO) \ --uavodir=$(ROOT_DIR)/shared/uavobjectdefinition \ --template="make/templates/$@.txt" \ @@ -852,6 +838,17 @@ $(DIST_NAME).gz: $(DIST_VER_INFO) .git/index | $(DIST_DIR) .PHONY: dist dist: $(DIST_NAME).gz + +############################## +# +# Directories +# +############################## + +$(DIRS): + $(V1) $(MKDIR) -p $@ + + ############################## # # Help message, the default Makefile goal From acdba01d4d139c393807fd9991999bdaf1bb4ff0 Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 2 Apr 2015 09:26:37 +1300 Subject: [PATCH 10/11] OP-1792 Maefile tidy: Rewrote ground build so qmake is only run by defualt on first build --- Makefile | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index ca5c0c88b..6860634c6 100644 --- a/Makefile +++ b/Makefile @@ -451,8 +451,9 @@ sim_osx_%: uavobjects_flight all_ground: openpilotgcs uploader # Convenience target for the GCS -.PHONY: gcs gcs_clean +.PHONY: gcs gcs_qmake gcs_clean gcs: openpilotgcs +gcs_qmake: openpilotgcs_qmake gcs_clean: openpilotgcs_clean ifeq ($(V), 1) @@ -461,25 +462,19 @@ else GCS_SILENT := silent endif -.NOTPARALLEL: -.PHONY: openpilotgcs -openpilotgcs: uavobjects_gcs openpilotgcs_qmake openpilotgcs_make - OPENPILOTGCS_DIR := $(BUILD_DIR)/openpilotgcs_$(GCS_BUILD_CONF) DIRS += $(OPENPILOTGCS_DIR) +OPENPILOTGCS_MAKEFILE := $(OPENPILOTGCS_DIR)/Makefile + .PHONY: openpilotgcs_qmake -openpilotgcs_qmake: | $(OPENPILOTGCS_DIR) -ifeq ($(QMAKE_SKIP),) +openpilotgcs_qmake $(OPENPILOTGCS_MAKEFILE): | $(OPENPILOTGCS_DIR) $(V1) ( cd $(OPENPILOTGCS_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/openpilotgcs.pro -spec $(QT_SPEC) -r CONFIG+="$(GCS_BUILD_CONF) $(GCS_SILENT)" $(GCS_QMAKE_OPTS) \ ) -else - @$(ECHO) "skipping qmake" -endif -.PHONY: openpilotgcs_make -openpilotgcs_make: +.PHONY: openpilotgcs +openpilotgcs: uavobjects_gcs $(OPENPILOTGCS_MAKEFILE) $(V1) $(MAKE) -w -C $(OPENPILOTGCS_DIR)/$(MAKE_DIR); .PHONY: openpilotgcs_clean @@ -493,25 +488,19 @@ openpilotgcs_clean: # ################################ -.NOTPARALLEL: -.PHONY: uploader -uploader: uploader_qmake uploader_make - UPLOADER_DIR := $(BUILD_DIR)/uploader_$(GCS_BUILD_CONF) DIRS += $(UPLOADER_DIR) +UPLOADER_MAKEFILE := $(UPLOADER_DIR)/Makefile + .PHONY: uploader_qmake -uploader_qmake: | $(UPLOADER_DIR) -ifeq ($(QMAKE_SKIP),) +uploader_qmake $(UPLOADER_MAKEFILE): | $(UPLOADER_DIR) $(V1) ( cd $(UPLOADER_DIR) && \ $(QMAKE) $(ROOT_DIR)/ground/openpilotgcs/src/experimental/USB_UPLOAD_TOOL/upload.pro -spec $(QT_SPEC) -r CONFIG+="$(GCS_BUILD_CONF) $(GCS_SILENT)" $(GCS_QMAKE_OPTS) \ ) -else - @$(ECHO) "skipping qmake" -endif -.PHONY: uploader_make -uploader_make: +.PHONY: uploader +uploader: $(UPLOADER_MAKEFILE) $(V1) $(MAKE) -w -C $(UPLOADER_DIR) .PHONY: uploader_clean @@ -953,16 +942,15 @@ help: @$(ECHO) @$(ECHO) " [GCS]" @$(ECHO) " gcs - Build the Ground Control System (GCS) application (debug|release)" - @$(ECHO) " Skip qmake: QMAKE_SKIP=1" @$(ECHO) " Compile specific directory: MAKE_DIR=" - @$(ECHO) " Example: make gcs QMAKE_SKIP=1 MAKE_DIR=src/plugins/coreplugin" + @$(ECHO) " Example: make gcs MAKE_DIR=src/plugins/coreplugin" + @$(ECHO) " gcs_qmake - Run qmake for the Ground Control System (GCS) application (debug|release)" @$(ECHO) " gcs_clean - Remove the Ground Control System (GCS) application (debug|release)" @$(ECHO) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))" @$(ECHO) @$(ECHO) " [Uploader Tool]" @$(ECHO) " uploader - Build the serial uploader tool (debug|release)" - @$(ECHO) " Skip qmake: QMAKE_SKIP=1" - @$(ECHO) " Example: make uploader QMAKE_SKIP=1" + @$(ECHO) " uploader_qmake - Run qmake for the serial uploader tool (debug|release)" @$(ECHO) " uploader_clean - Remove the serial uploader tool (debug|release)" @$(ECHO) " Supported build configurations: GCS_BUILD_CONF=debug|release (default is $(GCS_BUILD_CONF))" @$(ECHO) From 24defde93bf946a9da4852fe8746fbf234b6012e Mon Sep 17 00:00:00 2001 From: James Duley Date: Sat, 11 Apr 2015 23:20:30 +1200 Subject: [PATCH 11/11] OP-1792 Makefile tidy: fix addCopyDirTarget on windows because directory timestamps are not updated when a file is modified --- ground/openpilotgcs/openpilotgcs.pri | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ground/openpilotgcs/openpilotgcs.pri b/ground/openpilotgcs/openpilotgcs.pri index b09693eaf..3141d1832 100644 --- a/ground/openpilotgcs/openpilotgcs.pri +++ b/ground/openpilotgcs/openpilotgcs.pri @@ -63,6 +63,8 @@ defineTest(addCopyDirTarget) { $${dir}.target = $$dest $${dir}.depends = $$src + # Windows does not update directory timestamp if files are modified + win32: $${dir}.depends += FORCE $${dir}.commands = @rm -rf \"$$targetPath($$dest)\" $$addNewline() # create directory. Better would be an order only dependency