$(MKDIR) 和 $(COPY_DIR) 等变量在哪里定义? [英] Where are variables such as $(MKDIR) and $(COPY_DIR) defined?

查看:41
本文介绍了$(MKDIR) 和 $(COPY_DIR) 等变量在哪里定义?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图获取这些变量包含的值,但我在网上找不到关于它们的任何信息,并且在 C:\Qt 文件夹中搜索此类字符串没有任何结果.

I am trying to get hold of the values these variables contain but I couldn't find any informations about them on the web and searching for such strings in C:\Qt folder brought up nothing.

这些变量在哪里定义的?

Where are these variables defined ?

推荐答案

在处理 .pro 文件和由 qmake 生成 Makefile 之前,会根据您的编译器和平台对其他几个文件进行预处理.这些文件的扩展名为 .prf 和 .conf,并从名为 mkspecs 的目录加载.

Before a .pro file is processed and your Makefiles are generated by qmake several other files are pre-processed based on your compiler and platform. These files have the extension .prf and .conf and are loaded from a directory called mkspecs.

Makefile 中 MKDIR 和 COPY_DIR 变量的值由以下文件中定义的 QMAKE_MKDIR 和 QMAKE_COPY_DIR 变量的值生成:

The values of MKDIR and COPY_DIR variables in your Makefiles are generated by the values of QMAKE_MKDIR and QMAKE_COPY_DIR variables defined in the following files:

C:\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\common\shell-unix.conf:

C:\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\common\shell-unix.conf:

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_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

C:\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\common\shell-win32.conf:

C:\Qt\Qt5.0.2\5.0.2\msvc2010\mkspecs\common\shell-win32.conf:

QMAKE_ZIP              = zip -r -9

QMAKE_COPY             = copy /y
QMAKE_COPY_DIR         = xcopy /s /q /y /i
QMAKE_MOVE             = move
QMAKE_DEL_FILE         = del
QMAKE_DEL_DIR          = rmdir
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

# xcopy copies the contained files if source is a directory. Deal with it.
CONFIG += copy_dir_files

(如您所见,我使用的是 Qt 5.0.2,因此您的机器上的路径可能不同.)

(As you can see I am using Qt 5.0.2 so the path might be different on your machine.)

这篇关于$(MKDIR) 和 $(COPY_DIR) 等变量在哪里定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆