diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-02-29 19:38:03 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-01 23:20:44 +0100 |
commit | d9bf972e2b5f6bace5b7be350a70b4207e320692 (patch) | |
tree | 242c2a984a7771348a8da12a87fa74bb974be4ba /qmake/Makefile.win32-g++ | |
parent | 1e92e8d385cd689dfd26c60d3c98ae93bb99d466 (diff) |
merge Makefile.win32-g++{,-sh}
the only difference is in the copy & del commands. the msys tools are
tolerant about windows paths, so this just works.
the in-makefile variant detection is stolen from tools/configure/.
Change-Id: Ia283c1fe2e2aaa8cd5b1dfd7ae29244115f07d65
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake/Makefile.win32-g++')
-rw-r--r-- | qmake/Makefile.win32-g++ | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 585061ed26..d9c3b0300a 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -2,12 +2,38 @@ ifeq "$(SOURCE_PATH)" "" SOURCE_PATH = .. endif -#cmd version - ifeq "$(BUILD_PATH)" "" BUILD_PATH = .. endif +# SHELL is the full path of sh.exe, unless +# 1) it is found in the current directory +# 2) it is not found at all +# 3) it is overridden on the command line with an existing file +# ... otherwise it is always sh.exe. Specifically, SHELL from the +# environment has no effect. +# +# This check will fail if SHELL is explicitly set to a not +# sh-compatible shell. This is not a problem, because configure.exe +# will not do that. +ifeq ($(SHELL), sh.exe) + ifeq ($(wildcard $(CURDIR)/sh.exe), ) + SH = 0 + else + SH = 1 + endif +else + SH = 1 +endif + +ifeq ($(SH), 1) + COPY = cp + DEL = rm -f +else + COPY = copy + DEL = del /f +endif + # # specific stuff for mingw g++ make # @@ -101,16 +127,16 @@ QTOBJS= \ qmake.exe: $(OBJS) $(QTOBJS) $(LINKQMAKE) - -copy qmake.exe $(BUILD_PATH)\bin\qmake.exe + -$(COPY) qmake.exe $(BUILD_PATH)\bin\qmake.exe Makefile: Makefile.win32-g++ @echo "Out of date, please rerun configure" clean:: - -del $(OBJS) $(QTOBJS) $(ADDCLEAN) + -$(DEL) $(OBJS) $(QTOBJS) $(ADDCLEAN) distclean:: clean - -del qmake + -$(DEL) qmake.exe .c.o: $(CXX) $(CFLAGS) $< |