2003-04-06 11:33:08 -05:00
|
|
|
PRJNAME=pyuno
|
|
|
|
PRJ=..
|
|
|
|
|
|
|
|
.INCLUDE : settings.mk
|
2004-09-08 10:55:34 -05:00
|
|
|
|
|
|
|
.IF "$(SYSTEM_PYTHON)" == "YES"
|
|
|
|
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,/,$/ \
|
|
|
|
$(shell +$(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc ))
|
|
|
|
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 $@
|
|
|
|
+cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
|
|
|
|
|
2003-07-02 09:19:02 -05:00
|
|
|
$(DESTROOT)$/lib$/% : $(SOLARLIBDIR)$/python$/%
|
|
|
|
-+$(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)
|
2003-07-02 09:19:02 -05: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)
|
|
|
|
-+$(MKDIRHIER) $(@:d)
|
|
|
|
-rm -f $@
|
|
|
|
cat $< > $@
|
2003-04-06 11:33:08 -05:00
|
|
|
.ENDIF
|
2004-09-08 10:55:34 -05:00
|
|
|
|
|
|
|
.ENDIF
|