diff options
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) $< |