mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-15 07:29:15 +01:00
OP-1853 Ground build tidy: remove targetPath as not needed.
Could be replaced with builtin $$shell_path but that appears to be buggy on windows git bash
This commit is contained in:
parent
7967480c74
commit
9d31ca939c
@ -11,10 +11,6 @@ defineReplace(cleanPath) {
|
||||
return($$join(out, /, $$pfx))
|
||||
}
|
||||
|
||||
defineReplace(targetPath) {
|
||||
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
||||
}
|
||||
|
||||
defineReplace(addNewline) {
|
||||
return($$escape_expand(\\n\\t))
|
||||
}
|
||||
@ -41,8 +37,8 @@ defineTest(addCopyFileTarget) {
|
||||
$${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)\"
|
||||
$${file}.commands = -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
||||
$${file}.commands += $(COPY_FILE) \"$$src\" \"$$dest\"
|
||||
|
||||
QMAKE_EXTRA_TARGETS += $$file
|
||||
POST_TARGETDEPS += $$eval($${file}.target)
|
||||
@ -66,10 +62,10 @@ defineTest(addCopyDirTarget) {
|
||||
# Windows does not update directory timestamp if files are modified
|
||||
win32: $${dir}.depends += FORCE
|
||||
|
||||
$${dir}.commands = @rm -rf \"$$targetPath($$dest)\" $$addNewline()
|
||||
$${dir}.commands = @rm -rf \"$$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)\"
|
||||
$${dir}.commands += -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
||||
$${dir}.commands += $(COPY_DIR) \"$$src\" \"$$dest\"
|
||||
|
||||
QMAKE_EXTRA_TARGETS += $$dir
|
||||
POST_TARGETDEPS += $$eval($${dir}.target)
|
||||
|
@ -11,10 +11,10 @@ defineReplace(prependAll) {
|
||||
return($$result)
|
||||
}
|
||||
|
||||
XMLPATTERNS = $$targetPath($$[QT_INSTALL_BINS]/xmlpatterns)
|
||||
LUPDATE = $$targetPath($$[QT_INSTALL_BINS]/lupdate) -locations relative -no-ui-lines -no-sort
|
||||
LRELEASE = $$targetPath($$[QT_INSTALL_BINS]/lrelease)
|
||||
LCONVERT = $$targetPath($$[QT_INSTALL_BINS]/lconvert)
|
||||
XMLPATTERNS = $$[QT_INSTALL_BINS]/xmlpatterns
|
||||
LUPDATE = $$[QT_INSTALL_BINS]/lupdate -locations relative -no-ui-lines -no-sort
|
||||
LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||
LCONVERT = $$[QT_INSTALL_BINS]/lconvert
|
||||
|
||||
TRANSLATIONS = $$prependAll(LANGUAGES, $$PWD/openpilotgcs_,.ts)
|
||||
|
||||
@ -26,7 +26,7 @@ QMAKE_SUBSTITUTES += extract-mimetypes.xq.in
|
||||
ts.commands += \
|
||||
$$XMLPATTERNS -output $$MIME_TR_H $$PWD/extract-mimetypes.xq && \
|
||||
(cd $$GCS_SOURCE_TREE && $$LUPDATE src $$MIME_TR_H -ts $$TRANSLATIONS) && \
|
||||
$$QMAKE_DEL_FILE $$targetPath($$MIME_TR_H)
|
||||
$$QMAKE_DEL_FILE $$MIME_TR_H
|
||||
|
||||
QMAKE_EXTRA_TARGETS += ts
|
||||
|
||||
|
@ -26,7 +26,7 @@ SOURCES = version_info.cpp
|
||||
|
||||
# Create custom version_info target which generates a real file
|
||||
version_info.target = $$VERSION_INFO_FILE
|
||||
version_info.commands = -$(MKDIR) $$targetPath($$VERSION_INFO_DIR) $$addNewline()
|
||||
version_info.commands = -$(MKDIR) $$VERSION_INFO_DIR $$addNewline()
|
||||
version_info.commands += $$VERSION_INFO_COMMAND \
|
||||
--path=\"$$ROOT_DIR\" \
|
||||
--template=\"$$VERSION_INFO_TEMPLATE\" \
|
||||
|
@ -20,7 +20,7 @@ include(../../python.pri)
|
||||
|
||||
# Create custom authors target which generates a real file
|
||||
authors.target = $$AUTHORS_FILE
|
||||
authors.commands = -$(MKDIR) $$targetPath($$AUTHORS_DIR) $$addNewline()
|
||||
authors.commands = -$(MKDIR) $$AUTHORS_DIR $$addNewline()
|
||||
authors.commands += $$AUTHORS_COMMAND \
|
||||
--infile=\"$$AUTHORS_SOURCE\" \
|
||||
--template=\"$$AUTHORS_TEMPLATE\" \
|
||||
|
@ -5,11 +5,6 @@
|
||||
|
||||
TEMPLATE = aux
|
||||
|
||||
# Some handy defines
|
||||
defineReplace(targetPath) {
|
||||
return($$replace(1, /, $$QMAKE_DIR_SEP))
|
||||
}
|
||||
|
||||
defineReplace(addNewline) {
|
||||
return($$escape_expand(\\n\\t))
|
||||
}
|
||||
@ -38,17 +33,17 @@ win32 {
|
||||
# Windows sometimes remembers working directory changed from Makefile, sometimes not.
|
||||
# That's why pushd/popd is used here - to make sure that we know current directory.
|
||||
|
||||
uavobjects.commands += -$(MKDIR) $$targetPath(../uavobject-synthetics) $$addNewline()
|
||||
uavobjects.commands += pushd $$targetPath(../uavobject-synthetics) &&
|
||||
uavobjects.commands += $$targetPath(../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator)
|
||||
uavobjects.commands += $$targetPath(../../shared/uavobjectdefinition)
|
||||
uavobjects.commands += $$targetPath(../..) &&
|
||||
uavobjects.commands += -$(MKDIR) ../uavobject-synthetics $$addNewline()
|
||||
uavobjects.commands += pushd ../uavobject-synthetics &&
|
||||
uavobjects.commands += ../uavobjgenerator/$${BUILD_CONFIG}/uavobjgenerator
|
||||
uavobjects.commands += ../../shared/uavobjectdefinition
|
||||
uavobjects.commands += ../.. &&
|
||||
uavobjects.commands += popd $$addNewline()
|
||||
|
||||
uavobjects.commands += -$(MKDIR) $$targetPath(../openpilotgcs) $$addNewline()
|
||||
uavobjects.commands += pushd $$targetPath(../openpilotgcs) &&
|
||||
uavobjects.commands += -$(MKDIR) ../openpilotgcs $$addNewline()
|
||||
uavobjects.commands += pushd ../openpilotgcs &&
|
||||
uavobjects.commands += $(QMAKE) -spec $$SPEC CONFIG+=$${BUILD_CONFIG} -r
|
||||
uavobjects.commands += $$targetPath(../../ground/openpilotgcs/)openpilotgcs.pro &&
|
||||
uavobjects.commands += ../../ground/openpilotgcs/openpilotgcs.pro &&
|
||||
uavobjects.commands += popd $$addNewline()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user