diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-02-06 18:00:57 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2015-03-06 19:08:40 +0000 |
commit | 95d385466dc367532b3da5e4e38533b20288ac28 (patch) | |
tree | e7c8e79b6a4e1ec5eef112432bbdfaa7905d1939 /mkspecs/features/spec_post.prf | |
parent | 6400e4bb10ad855bd62b019bf459b50aeac53468 (diff) |
centralize setup of shell-related variables in spec_post.prf
it makes no sense to let every spec do that separately, as it's fixed
by the generator+shell.
putting it into a file which is loaded regardless of the spec also
allows us to remove the hardcoded fallbacks from qmake.
if somebody overrode the values in their spec for some weird reasons,
they'll need to override spec_post.prf.
shell-{unix,win32}.conf are now dummies and print warnings.
Task-number: QTBUG-37269
Change-Id: I66c24fb4072ce4d63fdbfc57618daa2a48fa1d80
Reviewed-by: Jochen Seemann <seemann.jochen@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'mkspecs/features/spec_post.prf')
-rw-r--r-- | mkspecs/features/spec_post.prf | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/mkspecs/features/spec_post.prf b/mkspecs/features/spec_post.prf index b4f9ca47ae..c9578773fe 100644 --- a/mkspecs/features/spec_post.prf +++ b/mkspecs/features/spec_post.prf @@ -54,3 +54,65 @@ isEmpty(QMAKE_COMPILER) { warning("qmake spec does not announce the compiler family. Guessed $${QMAKE_COMPILER}.") } CONFIG += $$QMAKE_COMPILER + +equals(MAKEFILE_GENERATOR, MSBUILD) \ +|equals(MAKEFILE_GENERATOR, MSVC.NET) \ +|isEmpty(QMAKE_SH) { + QMAKE_ZIP = zip -r -9 + + QMAKE_COPY = copy /y + QMAKE_COPY_FILE = $$QMAKE_COPY + QMAKE_COPY_DIR = xcopy /s /q /y /i + # xcopy copies the contained files if source is a directory. Deal with it. + CONFIG += copy_dir_files + QMAKE_MOVE = move + QMAKE_DEL_FILE = del + QMAKE_DEL_DIR = rmdir + QMAKE_DEL_TREE = rmdir /s /q + QMAKE_CHK_EXISTS = if not exist %1 + QMAKE_CHK_DIR_EXISTS = if not exist # legacy + QMAKE_MKDIR = mkdir # legacy + QMAKE_MKDIR_CMD = if not exist %1 mkdir %1 & if not exist %1 exit 1 + QMAKE_STREAM_EDITOR = $(QMAKE) -install sed + QMAKE_INSTALL_FILE = copy /y + QMAKE_INSTALL_PROGRAM = copy /y +} else { + QMAKE_TAR = tar -cf + QMAKE_GZIP = gzip -9f + + QMAKE_COPY = cp -f + QMAKE_COPY_FILE = $$QMAKE_COPY + QMAKE_COPY_DIR = $$QMAKE_COPY -R + QMAKE_MOVE = mv -f + QMAKE_DEL_FILE = rm -f + QMAKE_DEL_DIR = rmdir + QMAKE_DEL_TREE = rm -rf + QMAKE_CHK_EXISTS = test -e %1 || + QMAKE_CHK_DIR_EXISTS = test -d # legacy + QMAKE_MKDIR = mkdir -p # legacy + QMAKE_MKDIR_CMD = test -d %1 || mkdir -p %1 + QMAKE_STREAM_EDITOR = sed + + equals(QMAKE_HOST.os, Windows) { + MINGW_IN_SHELL = 1 # legacy + # Override built-ins. + QMAKE_DIR_SEP = / + QMAKE_DIRLIST_SEP = : + # Because install's ability to set permissions is not relevant on Windows, + # and git's msys does not provide it to start with. + QMAKE_INSTALL_FILE = cp -f + QMAKE_INSTALL_PROGRAM = cp -f + } else { + QMAKE_INSTALL_FILE = install -m 644 -p + QMAKE_INSTALL_PROGRAM = install -m 755 -p + } +} +QMAKE_INSTALL_DIR = $$QMAKE_COPY_DIR +equals(QMAKE_HOST.os, Windows) { + # Ugly (and broken for relative paths) hack to support cross-building for Unix. + QMAKE_SYMBOLIC_LINK = $$QMAKE_COPY + QMAKE_LN_SHLIB = $$QMAKE_SYMBOLIC_LINK +} else { + QMAKE_SYMBOLIC_LINK = ln -f -s + QMAKE_LN_SHLIB = ln -s +} |