Ignore:
Timestamp:
Jul 29, 2009, 6:57:31 PM (11 years ago)
Author:
Dmitry A. Kuminov
Message:

qmake/OS/2: Added DEFINES_RSP file generation to overcome command line length limitation when calling moc (#23).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mkspecs/features/moc.prf

    r2 r94  
    22#global defaults
    33isEmpty(QMAKE_MOC) {
    4     win32:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
     4    win32|os2:QMAKE_MOC = $$[QT_INSTALL_BINS]\moc.exe
    55    else:QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
    66}
     
    1111# This function on Windows puts the includes into a .inc file which moc will read, if the project
    1212# has more than 30 includes. We do this to overcome a command-line limit on Win < XP
    13 # Otherwise the function simply returns the normal command-line for moc
     13# Otherwise the function simply returns the normal command-line for moc. On OS/2
     14# (where similar command line length restrictions apply) the function does a similar
     15# substitiution using response files defined in mkspecs/os2-*/qmake.conf (which are
     16# also used by the compiler andn other tools)
    1417defineReplace(mocCmd) {
    1518    win32:count($$list($$INCPATH), 40, >) {
     
    3437        RET += $$QMAKE_MOC $(DEFINES) @$$INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2
    3538        return($$RET)
     39    }
     40    os2 {
     41        isEmpty(QMAKE_INCPATH_RSP_VAR):I = $(INCPATH)
     42        else:I = @$($$QMAKE_INCPATH_RSP_VAR)
     43        isEmpty(QMAKE_DEFINES_RSP_VAR):D = $(INCPATH)
     44        else:D = @$($$QMAKE_DEFINES_RSP_VAR)
     45
     46        return($$QMAKE_MOC $$D $$I $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
    3647    }
    3748    return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2)
Note: See TracChangeset for help on using the changeset viewer.