office-gobmx/pyuno/zipcore/makefile.mk
Rüdiger Timm 13bc49d2fc INTEGRATION: CWS execshellmacrogone (1.11.4); FILE MERGED
2007/10/24 08:42:53 rene 1.11.4.2: RESYNC: (1.11-1.12); FILE MERGED
2007/10/24 06:35:43 rene 1.11.4.1: #i79760# krs patches for supressing "Executing shell macro..." output
2007-11-06 14:59:02 +00:00

72 lines
1.6 KiB
Makefile
Executable file

PRJNAME=pyuno
PRJ=..
.INCLUDE : settings.mk
.IF "$(SYSTEM_PYTHON)" == "YES" || "$(GUI)" == "OS2"
systempython:
@echo "Not building python-core because system python is being used"
.ELSE
.INCLUDE : pyversion.mk
PYDIRNAME=python-core-$(PYVERSION)
DESTROOT=$(BIN)$/python-core-$(PYVERSION)
.IF "$(GUI)" == "UNX"
PYTHONBINARY=$(BIN)$/python$(EXECPOST).bin
.ELSE
PYTHONBINARY=$(DESTROOT)$/bin$/python$(EXECPOST)
.ENDIF
FINDLIBFILES_TMP:=$(subst,/,$/ \
$(shell @$(FIND) $(SOLARLIBDIR)$/python -type f| $(GREP) -v .pyc |$(GREP) -v .py\~ |$(GREP) -v .orig ))
FINDLIBFILES=$(subst,$(SOLARLIBDIR)$/python, $(FINDLIBFILES_TMP))
FILES=\
$(PYTHONBINARY) \
$(foreach,i,$(FINDLIBFILES) $(DESTROOT)$/lib$(i))
target: \
$(BIN)$/python-core-$(PYVERSION).zip \
$(BIN)$/python.sh
$(BIN)$/python.sh : python.sh
-rm -f $@
cat $? > $@
sed 's/%%PYVERSION%%/$(PYVERSION)/g' < $@ > $@.new
mv $@.new $@
.IF "$(GUI)" == "UNX"
chmod +x $@
.ENDIF
$(BIN)$/python-core-$(PYVERSION).zip : $(FILES) $(BIN)$/python.sh
.IF "$(GUI)" == "UNX"
.IF "$(OS)" != "MACOSX"
cd $(BIN) && find . -name '*$(DLLPOST)' | xargs strip
.ENDIF
.ENDIF
-rm -f $@
cd $(BIN) && zip -r $(PYDIRNAME).zip $(PYDIRNAME)
$(DESTROOT)$/lib$/% : $(SOLARLIBDIR)$/python$/%
-$(MKDIRHIER) $(@:d)
-rm -f $@
cat $< > $@
.IF "$(GUI)"== "UNX"
$(BIN)$/python$(EXECPOST).bin : $(SOLARBINDIR)$/python$(EXECPOST)
-$(MKDIRHIER) $(@:d)
-rm -f $@
cat $< > $@
.IF "$(OS)" != "MACOSX"
strip $@
.ENDIF
chmod +x $@
.ELSE
$(DESTROOT)$/bin$/python$(EXECPOST) : $(SOLARBINDIR)$/python$(EXECPOST)
-$(MKDIRHIER) $(@:d)
-rm -f $@
cat $< > $@
.ENDIF
.ENDIF