merge the formfield patch from ooo-build
[ooovba.git] / solenv / inc / pstrules.mk
blobb8e2f21cbb4a974d770f36415063c45996ebd98c
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: pstrules.mk,v $
11 # $Revision: 1.50 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33 #+++++++++++ second_build rules +++++++++++++++++++++++++++++++++++++
34 #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
36 .IF "$(SECOND_BUILD)"!=""
37 .IF "$($(SECOND_BUILD)_OBJFILES)"!=""
39 $(OBJ)/$(SECOND_BUILD)_%.obj : %.cxx
40 @echo ------------------------------
41 @echo "Making: " $@
42 .IF "$(GUI)"=="UNX"
43 @$(RM) $@ $(@:s/.obj/.o/)
44 $(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
45 .IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
46 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
47 .ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
48 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
49 .ELSE
50 @$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ >& $(NULLDEV) $(FI)
51 $(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
52 .ENDIF
54 $(OBJ)/$(SECOND_BUILD)_%.obj : %.c
55 @echo ------------------------------
56 @echo "Making: " $@
57 .IF "$(GUI)"=="UNX"
58 .IF "$(TEST)"!=""
59 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) -E $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c
60 .ELSE
61 @$(RM) $@ $(@:s/.obj/.o/)
62 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)/$(SECOND_BUILD)_$*.o $*.c
63 .IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
64 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
65 .ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
66 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
67 .ENDIF
68 .ELSE
69 @$(TYPE) $(mktmp $(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
70 @echo.
71 .IF "$(COM)"=="GCC"
72 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c
73 .ELSE
74 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
75 .ENDIF
76 $(SEMADEBUG)
77 .ENDIF
79 .ENDIF # "$($(SECOND_BUILD)_OBJFILES)"!=""
81 .IF "$($(SECOND_BUILD)_SLOFILES)"!=""
83 $(SLO)/$(SECOND_BUILD)_%.obj : %.cxx
84 @echo ------------------------------
85 @echo "Making: " $@
86 .IF "$(GUI)"=="UNX"
87 @$(RM) $@ $(@:s/.obj/.o/)
88 $(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
89 .IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
90 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
91 .ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
92 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
93 .ELSE
94 @-$(RM) $@
95 .IF "$(COM)"=="GCC"
96 $(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
97 .ELSE
98 $(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 )
99 .ENDIF
100 .ENDIF
102 $(SLO)/$(SECOND_BUILD)_%.obj : %.c
103 @echo ------------------------------
104 @echo "Making: " $@
105 .IF "$(GUI)"=="UNX"
106 @$(RM) $@ $(@:s/.obj/.o/)
107 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)/$(SECOND_BUILD)_$*.o $*.c
108 .IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
109 $(COMMAND_ECHO)$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
110 .ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
111 @$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
112 .ELSE
113 @-$(RM) $@
114 .IF "$(COM)"=="GCC"
115 $(COMMAND_ECHO)$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c
116 .ELSE
117 $(COMMAND_ECHO)$(TYPE) $(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c )
118 $(COMMAND_ECHO)$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)/$(SECOND_BUILD)_$*.obj $*.c )
119 .ENDIF
120 .ENDIF
122 .ENDIF # "$($(SECOND_BUILD)_SLOFILES)"!=""
123 .ENDIF # "$(SECOND_BUILD)"!=""
125 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
126 #+++++++++++ srcipting rules ++++++++++++++++++++++++++++++++++++++++
127 #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
129 .IF "$(PARFILES)"!=""
130 ULFPARFILES=$(foreach,i,$(ULFFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$(i:b).par))
131 MOREPARFILES=$(foreach,i,$(PARFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)/$j/$i ))
132 ALLPARFILES=$(uniq $(ULFPARFILES) $(MOREPARFILES))
134 SCP_PRODUCT_TYPE*=FAT
136 .IF "$(GUI)" == "WNT"
137 LANGFILEEXT=mlf
138 .ELSE
139 LANGFILEEXT=jlf
140 .ENDIF
142 $(PAR)/%.par :
143 @echo ------------------------------
144 @echo Making: $@
145 @@-$(MKDIR) $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}
146 .IF "$(GUI)"=="WNT"
147 $(CPPLCC) -+ -P $(INCLUDE) $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre
148 .ENDIF
149 # YD: INCLUDE macro too long, include only few items (scp2 compile)
150 .IF "$(GUI)"=="OS2"
151 $(CPPLCC) -+ -P -I..\..\inc -I..\..\os2gcci.pro\inc $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
152 .ENDIF
153 .IF "$(GUI)"=="UNX"
154 $(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
155 .ENDIF
156 .IF "$(common_build_srs)"!=""
157 $(SCPCOMP) -l {$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
158 .ELSE # "$(common_build_srs)"!=""
159 $(SCPCOMP) -l {$(MISC)/$(TARGET)/$(@:b).$(LANGFILEEXT)} -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
160 .ENDIF # "$(common_build_srs)"!=""
161 # hacked version
162 # $(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
164 .ENDIF # "$(PARFILES)"!=""
166 .IF "$(TESTDIR)"!=""
168 # workaround for strange dmake bug:
169 # if the previous block was a rule or a target, "\#" isn't recognized
170 # as an escaped "#". if it was an assignment, escaping works...
171 some_unique_variable_name:=1
173 .IF "$(OS)" == "WNT"
174 REGEXP:="s/^[\#].*//"
175 .ELSE
176 REGEXP:='s/^[\#].*//'
177 .ENDIF
179 $(MISC)/%.exp : sce/%.sce
180 @@-$(RM) $@
181 @@-$(RM) $(@:d)$(@:b).tst
182 $(COMMAND_ECHO)$(TYPE) $< | sed $(REGEXP) | sed "s/^/test_/" > $(@:d)$(@:b).tst
183 $(COMMAND_ECHO)$(TYPE) $(@:d)$(@:b).tst | sed "/test_./ w $@"
185 .ENDIF # "$(TESTDIR)"!=""