b10566a0a7
2007/07/31 20:37:21 obr 1.9.36.2: RESYNC: (1.9-1.11); FILE MERGED 2006/12/28 15:02:21 ydario 1.9.36.1: OS/2 initial import.
72 lines
1.6 KiB
Makefile
Executable file
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
|