office-gobmx/solenv/inc/pstrules.mk

182 lines
8.7 KiB
Makefile
Raw Normal View History

2001-06-20 03:09:38 -05:00
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2008 by Sun Microsystems, Inc.
2001-06-20 03:09:38 -05:00
#
# OpenOffice.org - a multi-platform office productivity suite
2001-06-20 03:09:38 -05:00
#
# $RCSfile: pstrules.mk,v $
2001-06-20 03:09:38 -05:00
#
# $Revision: 1.49 $
2001-06-20 03:09:38 -05:00
#
# This file is part of OpenOffice.org.
2001-06-20 03:09:38 -05:00
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
2001-06-20 03:09:38 -05:00
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
2001-06-20 03:09:38 -05:00
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
2001-06-20 03:09:38 -05:00
#
#*************************************************************************
2000-09-20 08:43:26 -05:00
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++ second_build rules +++++++++++++++++++++++++++++++++++++
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.IF "$(SECOND_BUILD)"!=""
.IF "$($(SECOND_BUILD)_OBJFILES)"!=""
2000-09-20 08:43:26 -05:00
$(OBJ)$/$(SECOND_BUILD)_%.obj : %.cxx
@echo ------------------------------
@echo Making: $@
.IF "$(GUI)"=="UNX"
@$(RM) $@ $(@:s/.obj/.o/)
$(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
.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
.ELSE
@$(IFEXIST) $@ $(THEN) $(RM:s/+//) $@ >& $(NULLDEV) $(FI)
$(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
2000-09-20 08:43:26 -05:00
.ENDIF
$(OBJ)$/$(SECOND_BUILD)_%.obj : %.c
@echo ------------------------------
@echo Making: $@
.IF "$(GUI)"=="UNX"
.IF "$(TEST)"!=""
$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) -E $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)$/$(SECOND_BUILD)_$*.o $*.c
2000-09-20 08:43:26 -05:00
.ELSE
@$(RM) $@ $(@:s/.obj/.o/)
$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(OBJ)$/$(SECOND_BUILD)_$*.o $*.c
.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
2000-09-20 08:43:26 -05:00
.ENDIF
.ELSE
@$(TYPE) $(mktmp $(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
@echo.
2000-09-20 08:43:26 -05:00
.IF "$(COM)"=="GCC"
$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c
2000-09-20 08:43:26 -05:00
.ELSE
$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSOBJ) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSOBJ) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(OBJ)\$(SECOND_BUILD)_$*.obj $*.c )
2000-09-20 08:43:26 -05:00
.ENDIF
$(SEMADEBUG)
.ENDIF
.ENDIF # "$($(SECOND_BUILD)_OBJFILES)"!=""
2000-09-20 08:43:26 -05:00
.IF "$($(SECOND_BUILD)_SLOFILES)"!=""
2000-09-20 08:43:26 -05:00
$(SLO)$/$(SECOND_BUILD)_%.obj : %.cxx
@echo ------------------------------
@echo Making: $@
.IF "$(GUI)"=="UNX"
@$(RM) $@ $(@:s/.obj/.o/)
$(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
.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
.ELSE
@-$(RM) $@
.IF "$(COM)"=="GCC"
$(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
.ELSE
$(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 )
2000-09-20 08:43:26 -05:00
.ENDIF
.ENDIF
2000-09-20 08:43:26 -05:00
$(SLO)$/$(SECOND_BUILD)_%.obj : %.c
@echo ------------------------------
@echo Making: $@
.IF "$(GUI)"=="UNX"
@$(RM) $@ $(@:s/.obj/.o/)
$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ) $(SLO)$/$(SECOND_BUILD)_$*.o $*.c
.IF "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(ADJUSTVISIBILITY) -p $(@:s/.obj/.o/)
.ENDIF # "$(OS)"=="SOLARIS" && "$(product)"=="full" && "$(debug)"==""
$(IFEXIST) $(@:s/.obj/.o/) $(THEN) $(TOUCH) $@ $(FI)
.ELSE
@-$(RM) $@
2000-09-20 08:43:26 -05:00
.IF "$(COM)"=="GCC"
$(CC) $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)$/$(SECOND_BUILD)_$*.obj $*.c
2000-09-20 08:43:26 -05:00
.ELSE
$(TYPE) $(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)$/$(SECOND_BUILD)_$*.obj $*.c )
$(CC) @$(mktmp $(CFLAGS) $(INCLUDE_C) $(CFLAGSCC) $(CFLAGSSLO) $(CDEFS) $($(SECOND_BUILD)CDEFS) $(CDEFSSLO) $(CDEFSMT) $(CFLAGSAPPEND) $(CFLAGSOUTOBJ)$(SLO)$/$(SECOND_BUILD)_$*.obj $*.c )
2000-09-20 08:43:26 -05:00
.ENDIF
.ENDIF
2000-09-20 08:43:26 -05:00
.ENDIF # "$($(SECOND_BUILD)_SLOFILES)"!=""
2000-09-20 08:43:26 -05:00
.ENDIF # "$(SECOND_BUILD)"!=""
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+++++++++++ srcipting rules ++++++++++++++++++++++++++++++++++++++++
#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.IF "$(PARFILES)"!=""
ULFPARFILES=$(foreach,i,$(ULFFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)$/$j$/$(i:b).par))
MOREPARFILES=$(foreach,i,$(PARFILES) $(foreach,j,$(SCP_PRODUCT_TYPE) $(PAR)$/$j$/$i ))
ALLPARFILES=$(uniq $(ULFPARFILES) $(MOREPARFILES))
2000-09-20 08:43:26 -05:00
SCP_PRODUCT_TYPE*=FAT
.IF "$(GUI)" == "WNT"
LANGFILEEXT=mlf
.ELSE
LANGFILEEXT=jlf
.ENDIF
$(PAR)$/%.par :
2000-09-20 08:43:26 -05:00
@echo ------------------------------
@echo Making: $@
@@-$(MKDIR) $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}
2000-09-20 08:43:26 -05:00
.IF "$(GUI)"=="WNT"
$(CPPLCC) -+ -P $(INCLUDE) $(CDEFS) $(SCPDEFS) -DDLLPOSTFIX=$(DLLPOSTFIX) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
2000-09-20 08:43:26 -05:00
.ENDIF
.IF "$(GUI)"=="UNX"
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
2000-09-20 08:43:26 -05:00
.ENDIF
.IF "$(common_build_srs)"!=""
$(SCPCOMP) -l {$(subst,$(OUTPATH),$(COMMON_OUTDIR) $(MISC))$/$(TARGET)$/$(@:b).$(LANGFILEEXT)} -s $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre -o $@
.ELSE # "$(common_build_srs)"!=""
$(SCPCOMP) -l {$(MISC)$/$(TARGET)$/$(@:b).$(LANGFILEEXT)} -s $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre -o $@
.ENDIF # "$(common_build_srs)"!=""
# hacked version
# $(SCPCOMP) -l $(@:b).$(LANGFILEEXT) -s $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre -o $@
2000-09-20 08:43:26 -05:00
.ENDIF # "$(PARFILES)"!=""
.IF "$(TESTDIR)"!=""
# workaround for strange dmake bug:
# if the previous block was a rule or a target, "\#" isn't recognized
# as an escaped "#". if it was an assignment, escaping works...
some_unique_variable_name:=1
.IF "$(OS)" == "WNT"
REGEXP:="s/^[\#].*$$//"
.ELSE
REGEXP:='s/^[\#].*$$//'
.ENDIF
$(MISC)$/%.exp : sce$/%.sce
@@-$(RM) $@
@@-$(RM) $(@:d)$(@:b).tst
$(TYPE) $< | sed $(REGEXP) | sed "s/^/test_/" > $(@:d)$(@:b).tst
$(TYPE) $(@:d)$(@:b).tst | sed "/test_./ w $@"
.ENDIF # "$(TESTDIR)"!=""