1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: pstrules.mk,v $
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
------------------------------
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
)
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
54 $(OBJ
)/$(SECOND_BUILD
)_
%.obj
: %.c
55 @echo
------------------------------
59 $(COMMAND_ECHO
)$(CC
) $(CFLAGS
) $(INCLUDE_C
) $(CFLAGSCC
) $(CFLAGSOBJ
) $(CDEFS
) $($(SECOND_BUILD
)CDEFS
) $(CDEFSOBJ
) -E
$(CFLAGSAPPEND
) $(CFLAGSOUTOBJ
) $(OBJ
)/$(SECOND_BUILD
)_
$*.o
$*.c
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
)
69 @
$(TYPE
) $(mktmp
$(CC
) $(CFLAGS
) $(INCLUDE_C
) $(CFLAGSCC
) $(CFLAGSOBJ
) $(CDEFS
) $($(SECOND_BUILD
)CDEFS
) $(CDEFSOBJ
) $(CFLAGSAPPEND
) $(CFLAGSOUTOBJ
)$(OBJ
)\
$(SECOND_BUILD
)_
$*.obj
$*.c
)
72 $(COMMAND_ECHO
)$(CC
) $(CFLAGS
) $(INCLUDE_C
) $(CFLAGSCC
) $(CFLAGSOBJ
) $(CDEFS
) $($(SECOND_BUILD
)CDEFS
) $(CDEFSOBJ
) $(CFLAGSAPPEND
) $(CFLAGSOUTOBJ
)$(OBJ
)\
$(SECOND_BUILD
)_
$*.obj
$*.c
74 $(COMMAND_ECHO
)$(CC
) @
$(mktmp
$(CFLAGS
) $(INCLUDE_C
) $(CFLAGSCC
) $(CFLAGSOBJ
) $(CDEFS
) $($(SECOND_BUILD
)CDEFS
) $(CDEFSOBJ
) $(CFLAGSAPPEND
) $(CFLAGSOUTOBJ
)$(OBJ
)\
$(SECOND_BUILD
)_
$*.obj
$*.c
)
79 .ENDIF
# "$($(SECOND_BUILD)_OBJFILES)"!=""
81 .IF
"$($(SECOND_BUILD)_SLOFILES)"!=""
83 $(SLO
)/$(SECOND_BUILD
)_
%.obj
: %.
cxx
84 @echo
------------------------------
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
)
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
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 )
102 $(SLO
)/$(SECOND_BUILD
)_
%.obj
: %.c
103 @echo
------------------------------
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
)
115 $(COMMAND_ECHO
)$(CC
) $(CFLAGS
) $(INCLUDE_C
) $(CFLAGSCC
) $(CFLAGSSLO
) $(CDEFS
) $($(SECOND_BUILD
)CDEFS
) $(CDEFSSLO
) $(CDEFSMT
) $(CFLAGSAPPEND
) $(CFLAGSOUTOBJ
)$(SLO
)/$(SECOND_BUILD
)_
$*.obj
$*.c
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
)
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"
143 @echo
------------------------------
145 @@
-$(MKDIR
) $(MISC
)/{$(subst,$(@
:d
:d
:d
), $(@
:d
:d
))}
147 $(CPPLCC
) -+ -P
$(INCLUDE
) $(CDEFS
) $(SCPDEFS
) -DDLLPOSTFIX
=$(DLLPOSTFIX
) $(*:b
).scp
> $(MISC
)/{$(subst,$(@
:d
:d
:d
), $(@
:d
:d
))}/$(*:b
).pre
149 # YD: INCLUDE macro too long, include only few items (scp2 compile)
151 $(CPPLCC
) -+ -P
-I..\..\inc
-I..\..\os2gcci.pro\inc
$(CDEFS
) $(SCPDEFS
) -DDLLPOSTFIX
=$(DLLPOSTFIX
) $(*:b
).scp
> $(MISC
)$/{$(subst,$(@
:d
:d
:d
), $(@
:d
:d
))}$/$(*:b
).pre
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
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)"!=""
162 # $(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)/{$(subst,$(@:d:d:d), $(@:d:d))}/$(*:b).pre -o $@
164 .ENDIF
# "$(PARFILES)"!=""
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
174 REGEXP
:="s/^[\#].*//"
176 REGEXP
:='s/^[\#].*//'
179 $(MISC
)/%.exp
: sce
/%.sce
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)"!=""