1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 11# OpenOffice.org is free software: you can redistribute it and/or modify 12# it under the terms of the GNU Lesser General Public License version 3 13# only, as published by the Free Software Foundation. 14# 15# OpenOffice.org is distributed in the hope that it will be useful, 16# but WITHOUT ANY WARRANTY; without even the implied warranty of 17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18# GNU Lesser General Public License version 3 for more details 19# (a copy is included in the LICENSE file that accompanied this code). 20# 21# You should have received a copy of the GNU Lesser General Public License 22# version 3 along with OpenOffice.org. If not, see 23# <http://www.openoffice.org/license.html> 24# for a copy of the LGPLv3 License. 25# 26#************************************************************************* 27 28#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 29#+++++++++++ second_build rules +++++++++++++++++++++++++++++++++++++ 30#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 31 32.IF "$(SECOND_BUILD)"!="" 33.IF "$($(SECOND_BUILD)_OBJFILES)"!="" 34 35$(OBJ)/$(SECOND_BUILD)_%.obj : %.cxx 36 @echo "Making: " $@ 37.IF "$(GUI)"=="UNX" 38 @$(RM) $@ $(@:s/.obj/.o/) 39 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSCXXOBJ) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $(CFLAGSINCXX)$(PWD)/$*.cxx 40.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 41 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 42.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 43 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 44.ELSE 45 @$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ >& $(NULLDEV) $(FI) 46 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx 47.ENDIF 48 49$(OBJ)/$(SECOND_BUILD)_%.obj : %.c 50 @echo "Making: " $@ 51.IF "$(GUI)"=="UNX" 52.IF "$(TEST)"!="" 53 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) -E $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c 54.ELSE 55 @$(RM) $@ $(@:s/.obj/.o/) 56 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c 57.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 58 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 59.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 60 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 61.ENDIF 62.ELSE 63 @$(TYPE) $(mktmp $(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c ) 64 @echo. 65.IF "$(COM)"=="GCC" 66 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c 67.ELSE 68 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c ) 69.ENDIF 70 $(SEMADEBUG) 71.ENDIF 72 73.ENDIF # "$($(SECOND_BUILD)_OBJFILES)"!="" 74 75.IF "$($(SECOND_BUILD)_SLOFILES)"!="" 76 77$(SLO)/$(SECOND_BUILD)_%.obj : %.cxx 78 @echo "Making: " $@ 79.IF "$(GUI)"=="UNX" 80 @$(RM) $@ $(@:s/.obj/.o/) 81 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSCXXSLO) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $(CFLAGSINCXX)$(PWD)/$*.cxx 82.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 83 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 84.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 85 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 86.ELSE 87 @-$(RM) $@ 88.IF "$(COM)"=="GCC" 89 $(COMMAND_ECHO)$(CXX) $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx 90.ELSE 91 $(COMMAND_ECHO)$(CXX) @$(mktmp $(CFLAGS) $(INCLUDE) $(CFLAGSCXX) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(!eq,$(EXCEPTIONSFILES),$(subst,$@, $(EXCEPTIONSFILES)) $(LOCAL_EXCEPTIONS_FLAGS) $(GLOBAL_EXCEPTIONS_FLAGS)) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $(CFLAGSINCXX)$(PWD)/$*.cxx ) 92.ENDIF 93.ENDIF 94 95$(SLO)/$(SECOND_BUILD)_%.obj : %.c 96 @echo "Making: " $@ 97.IF "$(GUI)"=="UNX" 98 @$(RM) $@ $(@:s/.obj/.o/) 99 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $*.c 100.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 101 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/) 102.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"=="" 103 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI) 104.ELSE 105 @-$(RM) $@ 106.IF "$(COM)"=="GCC" 107 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c 108.ELSE 109 $(COMMAND_ECHO)$(TYPE) $(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c ) 110 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c ) 111.ENDIF 112.ENDIF 113 114.ENDIF # "$($(SECOND_BUILD)_SLOFILES)"!="" 115.ENDIF # "$(SECOND_BUILD)"!="" 116 117#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 118#+++++++++++ srcipting rules ++++++++++++++++++++++++++++++++++++++++ 119#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 120 121.IF "$(PARFILES)"!="" 122ULFPARFILES=$(foreach,i,$(ULFFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$(i:b).par)) 123MOREPARFILES=$(foreach,i,$(PARFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$i )) 124ALLPARFILES=$(uniq $(ULFPARFILES) $(MOREPARFILES)) 125 126SCP_PRODUCT_TYPE*=FAT 127 128.IF "$(GUI)" == "WNT" 129LANGFILEEXT=mlf 130.ELSE 131LANGFILEEXT=jlf 132.ENDIF 133 134$(PAR)/%.par : 135 @echo "Making: " $@ 136 @@-$(MKDIR) $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))} 137.IF "$(GUI)"=="WNT" 138 $(COMMAND_ECHO)$(CPPLCC) -+ -P $(INCLUDE) $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre 139.ENDIF 140# YD: INCLUDE macro too long, include only few items (scp2 compile) 141.IF "$(GUI)"=="OS2" 142 $(CPPLCC) -+ -P -I..\..\inc -I..\..\os2gcci.pro\inc $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre 143.ENDIF 144.IF "$(GUI)"=="UNX" 145 $(COMMAND_ECHO)$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/cpp.lcc -+ -P $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) -I. -I$(INC) -I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre 146.ENDIF 147.IF "$(common_build_srs)"!="" 148 $(COMMAND_ECHO)$(SCPCOMP) -l {$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 149.ELSE # "$(common_build_srs)"!="" 150 $(COMMAND_ECHO)$(SCPCOMP) -l {$(MISC)/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 151.ENDIF # "$(common_build_srs)"!="" 152# hacked version 153# $(COMMAND_ECHO)$(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@ 154 155.ENDIF # "$(PARFILES)"!="" 156