1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
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.
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).
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.
26 #*************************************************************************
34 .INCLUDE
: settings.mk
35 .IF
"$(L10N_framework)"==""
38 .IF
"$(SYSTEM_PYTHON)" == "YES" ||
"$(GUI)" == "OS2"
40 @echo
"Not building python-core because system python is being used"
43 .INCLUDE
: pyversion.mk
45 PYDIRNAME
=python-core-
$(PYVERSION
)
46 DESTROOT
=$(BIN
)$/$(PYDIRNAME
)
48 PYTHONBINARY
=$(BIN
)$/python
$(EXECPOST
).bin
51 PYTHONBINARY
=$(DESTROOT
)$/bin
$/python.bin
53 PYTHONBINARY
=$(DESTROOT
)$/bin
$/python
$(EXECPOST
)
57 FINDLIBFILES_TMP
:=$(subst,/,$/ \
58 $(shell @
$(FIND
) $(SOLARLIBDIR
)$/python
-type f|
$(GREP
) -v
"\.pyc" |
$(GREP
) -v
"\.py~" |
$(GREP
) -v .orig |
$(GREP
) -v _failed
))
59 FINDLIBFILES
=$(subst,$(SOLARLIBDIR
)$/python
, $(FINDLIBFILES_TMP
))
63 $(foreach,i
,$(FINDLIBFILES
) $(DESTROOT
)$/lib
$(i
))
67 APP1OBJS
= $(OBJFILES
) $(SOLARLIBDIR
)$/pathutils-obj.obj
70 OBJFILES
= $(OBJ
)$/python.obj
77 $(BIN
)$/$(PYDIRNAME
).zip
80 ALLTAR
: $(BIN
)$/python.sh
81 $(BIN
)$/python.sh
: python.sh
84 sed
's/%%PYVERSION%%/$(PYVERSION)/g' < $@
> $@.new
89 $(OBJ
)$/python.obj
: $(OUT
)$/inc
$/pyversion.hxx
91 $(OUT
)$/inc
$/pyversion.hxx
: pyversion.inc
92 $(SED
) $(USQ
)s
/@
/$(PYVERSION
)/g
$(USQ
) < $< > $@
94 $(BIN
)$/$(PYDIRNAME
).zip
: $(FILES
)
96 .IF
"$(OS)" != "MACOSX"
97 cd
$(DESTROOT
) && find .
-name
'*$(DLLPOST)' | xargs
strip
101 cd
$(BIN
) && zip
-r
$(PYDIRNAME
).zip
$(PYDIRNAME
)
103 $(DESTROOT
)$/lib
$/% : $(SOLARLIBDIR
)$/python
$/%
109 $(BIN
)$/python
$(EXECPOST
).bin
: $(SOLARBINDIR
)$/python
$(EXECPOST
)
113 .IF
"$(OS)" != "MACOSX"
118 .IF
"$(COM)" == "GCC"
119 $(DESTROOT
)$/bin
$/python.bin
: $(SOLARBINDIR
)$/python
$(EXECPOST
)
121 $(DESTROOT
)$/bin
$/python
$(EXECPOST
) : $(SOLARBINDIR
)$/python
$(EXECPOST
)
132 .ENDIF
# L10N_framework