Changeset 406


Ignore:
Timestamp:
Dec 10, 2009, 12:56:17 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake: Build qmake second time after building all DLLs using its .pro and link it to Qt DLLs on OS/2 (this became possible after the fix in #405). This greatly reduces its size and finally fixes the national characters in the date printed in the generarted Makefile headers.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.cmd

    r393 r406  
    5151    "QT_NO_PRINTER QT_NO_PRINTDIALOG QT_NO_DRAGANDDROP"
    5252
    53 G.QT_DEFAULT_BUILD_PARTS = "libs tools" /* examples demos docs translations */
     53G.QT_DEFAULT_BUILD_PARTS = "libs tools qmake" /* examples demos docs translations */
    5454
    5555/* all globals to be exposed in procedures */
     
    559559        G.QMAKE_EXEPACK_POST_FLAGS = ""
    560560    end
     561    /* export EXEPACK variables for building qmake (used by Makefile.os2-g++) */
     562    call SetEnv "QMAKE_EXEPACK", G.QMAKE_EXEPACK
     563    call SetEnv "QMAKE_EXEPACK_FLAGS", G.QMAKE_EXEPACK_FLAGS
     564    call SetEnv "QMAKE_EXEPACK_POST_FLAGS", G.QMAKE_EXEPACK_POST_FLAGS
    561565
    562566    /*--------------------------------------------------------------------------
     
    17231727
    17241728    /*--------------------------------------------------------------------------
    1725      re-build qmake using the .pro file
    1726     --------------------------------------------------------------------------*/
    1727 
    1728     call SaySay "Rebuilding qmake. Please wait..."
    1729 
    1730     /* this is necessary to to get all the fancy things such as embedded
    1731      * version information */
    1732 
    1733     curdir = directory()
    1734     call directory G.RelPath"\qmake"
    1735 
    1736     /* first, generate a Makefile from .pro */
    1737     address "cmd" G.OutPath"\bin\qmake.exe"
    1738     make_rc = rc
    1739 
    1740     if (make_rc == 0)  then do
    1741         /* now, run make */
    1742         address "cmd" G.MAKE "release"
    1743         make_rc = rc
    1744     end
    1745     call SaySay
    1746 
    1747     call directory curdir
    1748 
    1749     /* exit on failure */
    1750     if (make_rc \= 0)  then
    1751         call Done 2
    1752 
    1753     /*--------------------------------------------------------------------------
    17541729     build makefiles based on the configuration
    17551730    --------------------------------------------------------------------------*/
     
    17631738
    17641739    /* generate the root makefile */
    1765     address "cmd" G.OutPath"\bin\qmake.exe" G.RelPath"\projects.pro -o" G.OutPath"\Makefile"
     1740    str = G.OutPath"\bin\qmake.exe" G.RelPath"\projects.pro -o" G.OutPath"\Makefile"
     1741    say str
     1742    address "cmd" str
    17661743    make_rc = rc
    17671744    /* exit on failure */
    17681745    if (make_rc \= 0)  then
    17691746        call Done 2
     1747
     1748    if (pos("qmake", G.CFG_BUILD_PARTS) > 0) then do
     1749        /* generate the qmake makefile as well to overwrite the bootstrapped Makefile */
     1750        str = G.OutPath"\bin\qmake.exe" G.RelPath"\qmake\qmake.pro -o" G.OutPath"\qmake\Makefile"
     1751        say str
     1752        address "cmd" str
     1753        make_rc = rc
     1754        /* exit on failure */
     1755        if (make_rc \= 0)  then
     1756            call Done 2
     1757    end
    17701758
    17711759    /* generate the immediate child makefiles, otherwise 'make release|debug'
  • trunk/projects.pro

    r236 r406  
    4040       contains(QT_BUILD_PARTS, tools):include(translations/translations.pri)
    4141    } else:isEqual(PROJECT, qmake) {
    42 #      SUBDIRS += qmake
     42       os2:SUBDIRS += qmake
    4343    } else {
    4444       message(Unknown PROJECT: $$PROJECT)
  • trunk/qmake/Makefile.os2-g++

    r394 r406  
    3838endif
    3939
    40 OBJECTS_DIR = release-shared
     40OBJECTS_DIR = release-bootstrap
    4141
    4242# qmake code
     
    152152OBJECTS     = $(foreach src,$(SOURCES),$(call SRC_TO_OBJ,$(src)))
    153153
    154 $(BUILD_PATH)\bin\qmake.exe: $(OBJECTS)
     154qmake.exe: $(OBJECTS_DIR) $(OBJECTS)
    155155        $(LINK) -o $@ $(OBJECTS) $(LIBS)
     156ifneq "$(QMAKE_EXEPACK)" ""
     157        $(QMAKE_EXEPACK) $(QMAKE_EXEPACK_FLAGS) $@ $(QMAKE_EXEPACK_POST_FLAGS)
     158endif
     159        copy $@ $(BUILD_PATH)\bin\
     160
     161$(OBJECTS_DIR):
     162        @mkdir $(OBJECTS_DIR)
    156163
    157164Makefile: Makefile.os2-g++
     
    166173
    167174distclean:: clean
    168         -del $(BUILD_PATH)\bin\qmake.exe >nul 2>&1
     175        -del qmake.exe >nul 2>&1
    169176
    170177.SUFFIXES: .cpp .c
     
    178185define SRC_TO_OBJ_RULE
    179186$(call SRC_TO_OBJ,$(1)): $(1)
    180         @if not exist $(OBJECTS_DIR) mkdir $(OBJECTS_DIR)
    181187        $(CXX) -c $(CXXFLAGS) -o $$@ $$<
    182188endef
  • trunk/qmake/qmake.pri

    r389 r406  
    11CONFIG += depend_includepath
    2 
    3 QMAKE_INCREMENTAL =
    4 SKIP_DEPENDS += qconfig.h qmodules.h
    5 DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_STL QT_NO_COMPRESS QT_NO_UNICODETABLES \
    6            QT_NO_GEOM_VARIANT QT_NO_DATASTREAM
    72
    83#qmake code
     
    2924
    3025bootstrap { #Qt code
     26   QMAKE_INCREMENTAL =
     27   SKIP_DEPENDS += qconfig.h qmodules.h
     28   DEFINES += QT_NO_TEXTCODEC QT_NO_LIBRARY QT_NO_STL QT_NO_COMPRESS QT_NO_UNICODETABLES \
     29              QT_NO_GEOM_VARIANT QT_NO_DATASTREAM
    3130   DEFINES+=QT_NODLL QT_NO_THREAD
    3231   SOURCES+= \
  • trunk/qmake/qmake.pro

    r389 r406  
    44#platform than either of the generic makefiles
    55
    6 CONFIG += console bootstrap
    7 CONFIG -= qt shared app_bundle uic
    8 DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
     6os2 {
     7  # using this .pro, we build non-bootstrapped qmake which links to Qt DLLs
     8  CONFIG += console
     9  CONFIG -= uic
     10} else {
     11  CONFIG += console bootstrap
     12  CONFIG -= qt shared app_bundle uic
     13  DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
     14}
    915DESTDIR = ../bin/
    1016
     
    1723         $$QT_SOURCE_TREE/src/corelib/kernel \
    1824         $$QT_SOURCE_TREE/src/corelib/plugin \
    19         $$QT_SOURCE_TREE/src/corelib/io \
    20         $$QT_SOURCE_TREE/src/script
     25        $$QT_SOURCE_TREE/src/corelib/io \
     26        $$QT_SOURCE_TREE/src/script
    2127INCPATH += generators generators/unix generators/win32 generators/os2 generators/mac \
    2228           $$QT_SOURCE_TREE/include $$QT_SOURCE_TREE/include/QtCore \
Note: See TracChangeset for help on using the changeset viewer.