2003-04-06 11:33:08 -05:00
|
|
|
PRJNAME=pyuno
|
|
|
|
PRJ=..
|
|
|
|
|
|
|
|
.INCLUDE : settings.mk
|
2004-09-08 10:55:34 -05:00
|
|
|
|
2007-09-20 09:57:55 -05:00
|
|
|
.IF "$(SYSTEM_PYTHON)" == "YES" || "$(GUI)" == "OS2"
|
2004-09-08 10:55:34 -05:00
|
|
|
systempython:
|
|
|
|
@echo "Not building python-core because system python is being used"
|
|
|
|
.ELSE
|
|
|
|
|
2003-04-06 11:33:08 -05:00
|
|
|
.INCLUDE : pyversion.mk
|
|
|
|
|
|
|
|
PYDIRNAME=python-core-$(PYVERSION)
|
|
|
|
DESTROOT=$(BIN)$/python-core-$(PYVERSION)
|
2005-11-11 02:21:17 -06:00
|
|
|
.IF "$(GUI)" == "UNX"
|
|
|
|
PYTHONBINARY=$(BIN)$/python$(EXECPOST).bin
|
|
|
|
.ELSE
|
2003-07-02 09:19:02 -05:00
|
|
|
PYTHONBINARY=$(DESTROOT)$/bin$/python$(EXECPOST)
|
2005-11-11 02:21:17 -06:00
|
|
|
.ENDIF
|
2003-04-06 11:33:08 -05:00
|
|
|
|
2003-07-02 09:19:02 -05:00
|
|
|
FINDLIBFILES_TMP:=$(subst,/,$/ \
|
2007-03-26 10:00:36 -05:00
|
|
|
$(shell $(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc |$(GREP) -v .py\~ |$(GREP) -v .orig ))
|
2003-07-02 09:19:02 -05:00
|
|
|
FINDLIBFILES=$(subst,$(SOLARLIBDIR)$/python, $(FINDLIBFILES_TMP))
|
2003-04-06 11:33:08 -05:00
|
|
|
|
|
|
|
FILES=\
|
|
|
|
$(PYTHONBINARY) \
|
2003-07-02 09:19:02 -05:00
|
|
|
$(foreach,i,$(FINDLIBFILES) $(DESTROOT)$/lib$(i))
|
2003-04-06 11:33:08 -05:00
|
|
|
|
|
|
|
target: \
|
|
|
|
$(BIN)$/python-core-$(PYVERSION).zip \
|
|
|
|
$(BIN)$/python.sh
|
|
|
|
|
|
|
|
$(BIN)$/python.sh : python.sh
|
|
|
|
-rm -f $@
|
|
|
|
cat $? > $@
|
2005-11-11 02:21:17 -06:00
|
|
|
sed 's/%%PYVERSION%%/$(PYVERSION)/g' < $@ > $@.new
|
|
|
|
mv $@.new $@
|
2003-06-11 05:08:17 -05:00
|
|
|
.IF "$(GUI)" == "UNX"
|
2003-04-06 11:33:08 -05:00
|
|
|
chmod +x $@
|
2003-06-11 05:08:17 -05:00
|
|
|
.ENDIF
|
2003-04-06 11:33:08 -05:00
|
|
|
|
2005-12-14 08:38:42 -06:00
|
|
|
$(BIN)$/python-core-$(PYVERSION).zip : $(FILES) $(BIN)$/python.sh
|
2003-04-06 11:33:08 -05:00
|
|
|
.IF "$(GUI)" == "UNX"
|
2003-08-18 09:02:24 -05:00
|
|
|
.IF "$(OS)" != "MACOSX"
|
2004-02-02 12:32:21 -06:00
|
|
|
cd $(BIN) && find . -name '*$(DLLPOST)' | xargs strip
|
2003-08-18 09:02:24 -05:00
|
|
|
.ENDIF
|
2003-04-06 11:33:08 -05:00
|
|
|
.ENDIF
|
|
|
|
-rm -f $@
|
2007-01-25 08:35:54 -06:00
|
|
|
cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
|
2003-04-06 11:33:08 -05:00
|
|
|
|
2003-07-02 09:19:02 -05:00
|
|
|
$(DESTROOT)$/lib$/% : $(SOLARLIBDIR)$/python$/%
|
2007-01-25 08:35:54 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2003-04-06 11:33:08 -05:00
|
|
|
-rm -f $@
|
2003-07-02 09:19:02 -05:00
|
|
|
cat $< > $@
|
2003-04-06 11:33:08 -05:00
|
|
|
|
2005-11-11 02:21:17 -06:00
|
|
|
.IF "$(GUI)"== "UNX"
|
|
|
|
$(BIN)$/python$(EXECPOST).bin : $(SOLARBINDIR)$/python$(EXECPOST)
|
2007-01-25 08:35:54 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2003-04-06 11:33:08 -05:00
|
|
|
-rm -f $@
|
2003-07-02 09:19:02 -05:00
|
|
|
cat $< > $@
|
2004-02-02 12:32:21 -06:00
|
|
|
.IF "$(OS)" != "MACOSX"
|
|
|
|
strip $@
|
|
|
|
.ENDIF
|
2003-04-06 11:33:08 -05:00
|
|
|
chmod +x $@
|
2005-11-11 02:21:17 -06:00
|
|
|
.ELSE
|
|
|
|
$(DESTROOT)$/bin$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST)
|
2007-01-25 08:35:54 -06:00
|
|
|
-$(MKDIRHIER) $(@:d)
|
2005-11-11 02:21:17 -06:00
|
|
|
-rm -f $@
|
|
|
|
cat $< > $@
|
2003-04-06 11:33:08 -05:00
|
|
|
.ENDIF
|
2004-09-08 10:55:34 -05:00
|
|
|
|
|
|
|
.ENDIF
|