mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
LP-535 cosmetic renaming in addCopyFileTarget and addCopyDirTarget
This commit is contained in:
parent
53cf78e63f
commit
5e6b0e83b3
@ -33,19 +33,25 @@ defineTest(addCopyFileTarget) {
|
|||||||
src = $$2/$$1
|
src = $$2/$$1
|
||||||
dest = $$3/$$1
|
dest = $$3/$$1
|
||||||
|
|
||||||
$${file}.target = $$dest
|
target = $${file}
|
||||||
$${file}.depends = $$src
|
$${target}.target = $$dest
|
||||||
|
$${target}.depends = $$src
|
||||||
|
|
||||||
# create directory. Better would be an order only dependency
|
# create directory. Better would be an order only dependency
|
||||||
$${file}.commands = -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
$${target}.commands = -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
||||||
$${file}.commands += $(COPY_FILE) \"$$src\" \"$$dest\"
|
$${target}.commands += $(COPY_FILE) \"$$src\" \"$$dest\"
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += $$file
|
QMAKE_EXTRA_TARGETS += $$target
|
||||||
POST_TARGETDEPS += $$eval($${file}.target)
|
POST_TARGETDEPS += $$eval($${target}.target)
|
||||||
|
|
||||||
export($${file}.target)
|
export($${target}.target)
|
||||||
export($${file}.depends)
|
export($${target}.depends)
|
||||||
export($${file}.commands)
|
export($${target}.commands)
|
||||||
|
export(QMAKE_EXTRA_TARGETS)
|
||||||
|
export(POST_TARGETDEPS)
|
||||||
|
|
||||||
|
return(true)
|
||||||
|
}
|
||||||
|
|
||||||
defineTest(addCopyDependenciesTarget) {
|
defineTest(addCopyDependenciesTarget) {
|
||||||
file = $$1
|
file = $$1
|
||||||
@ -78,22 +84,23 @@ defineTest(addCopyDirTarget) {
|
|||||||
src = $$2/$$1
|
src = $$2/$$1
|
||||||
dest = $$3/$$1
|
dest = $$3/$$1
|
||||||
|
|
||||||
$${dir}.target = $$dest
|
target = $${dir}
|
||||||
$${dir}.depends = $$src
|
$${target}.target = $$dest
|
||||||
|
$${target}.depends = $$src
|
||||||
# Windows does not update directory timestamp if files are modified
|
# Windows does not update directory timestamp if files are modified
|
||||||
win32: $${dir}.depends += FORCE
|
win32:$${target}depends += FORCE
|
||||||
|
|
||||||
$${dir}.commands = @rm -rf \"$$dest\" $$addNewline()
|
$${target}.commands = @rm -rf \"$$dest\" $$addNewline()
|
||||||
# create directory. Better would be an order only dependency
|
# create directory. Better would be an order only dependency
|
||||||
$${dir}.commands += -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
$${target}.commands += -@$(MKDIR) \"$$dirname(dest)\" $$addNewline()
|
||||||
$${dir}.commands += $(COPY_DIR) \"$$src\" \"$$dest\"
|
$${target}.commands += $(COPY_DIR) \"$$src\" \"$$dest\"
|
||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += $$dir
|
QMAKE_EXTRA_TARGETS += $$target
|
||||||
POST_TARGETDEPS += $$eval($${dir}.target)
|
POST_TARGETDEPS += $$eval($${target}.target)
|
||||||
|
|
||||||
export($${dir}.target)
|
export($${target}.target)
|
||||||
export($${dir}.depends)
|
export($${target}.depends)
|
||||||
export($${dir}.commands)
|
export($${target}.commands)
|
||||||
export(QMAKE_EXTRA_TARGETS)
|
export(QMAKE_EXTRA_TARGETS)
|
||||||
export(POST_TARGETDEPS)
|
export(POST_TARGETDEPS)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user