JPE: Makefile fix for build on Linux et al.

Frederic Giacometti frederic.giacometti at arakne.com
Thu May 3 21:54:36 EDT 2001


There is a type on the Makefile of JPE beta1 (current version): the
dependency for generating python_Javapy.h is bugged.

Here is the patch/diff on jpe/Makefile (replacement of ine 47):
47c47
< $(LIBPREF)Javapy.$(OEXT): python_Javapy.h
---
> Javapy.$(OEXT): python_Javapy.h

I'm attaching the new file also (I cross my finger that this does not
mess up the news readers; let's see...)

python_Javapy.h can also be generated explicitely:

make [--win32]  python_Javapy.h

Sorry for the inconvenience...

FG



-------------- next part --------------
# 
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
# 
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
# 
# The Original Code is "Java-Python Extension (JPE)".
# 
# The Initial Developer of the Original Code is Frederic Bruno Giacometti.
# Portions created by Frederic Bruno Giacometti are
# Copyright (C) 2000-2001 Frederic Bruno Giacometti. All Rights Reserved.
# 
# Contributor(s): frederic.giacometti at arakne.com
#
# Acknowledgments:
# Particular gratitude is expressed to the following parties for their
# contributing support to the development of JPE:
#     - Arakne SARL (France) and its staff (http://www.arakne.com);
#       and in particular to Jean Hemmi, Marie-Therese Plaze and Didier Rano
#     - The European Union through its funding of the IST Alice project
#     - Dean Vucinic from Vrije Universiteit Brussel (Belgium),
#       coordinator of the IST Alice project
#     - iPhrase Technologies Inc. (Massachusetts, USA)
#

include config.mk

all:
	cd python && $(MAKE)
	$(MAKE) $(LIBPREF)Javapy.$(SOEXT)\
 java/javalib$(PYMODEXT)$(DBGEXT).$(SOEXT)
	cd samples && $(MAKE)
	cd jpetest && $(MAKE)

java/javalib$(PYMODEXT)$(DBGEXT).$(SOEXT): java/javalib.$(OEXT) $(JPELIB)
ifdef WinEnv
	$(LINKDLL) -export:initjavalib -out:$@ $^ $(JPELIB) $(PYLIB)
else
	$(LDSHARED) java/javalib.$(OEXT) -L. -ljpe $(PYLIB) -o $@
endif

Javapy.$(OEXT): python_Javapy.h

python_Javapy.h: python/Javapy.class
	$(JAVAH) python.Javapy

$(LIBPREF)Javapy.$(SOEXT): Javapy.$(OEXT) jutil.$(OEXT) $(JPELIB)
ifdef WinEnv
	$(LINKDLL) -out:$@ Javapy.$(OEXT) jutil.$(OEXT) $(JPELIB) $(PYLIB)
else
	$(LDSHARED)  Javapy.$(OEXT) jutil.$(OEXT) $(JPELIB) $(PYLIB) -o $@
endif

jpe.$(OEXT) Javapy.$(OEXT) java/javalib.$(OEXT): jpe.h
jutil.$(OEXT) jpe.$(OEXT) Javapy.$(OEXT): jutil.h

$(JPELIB): jpe.$(OEXT) jutil.$(OEXT)
ifdef WinEnv
	$(LINKDLL) -export:jvmmodule_methods,DATA\
 -export:jpe_Py_Initialize -export:jpe_initTypes -export:javalib_initJvm\
 -export:PyJobject_AsJobject -export:PyJinstance_FromJobject\
 -export:jobject_fromObject -export:pyThread_attachJNIEnv\
 -export:jpe_javapyinit\
 -out:jpe.dll jpe.$(OEXT) jutil.$(OEXT) $(PYLIB)
else
	$(LDSHARED) jpe.$(OEXT) jutil.$(OEXT) $(PYLIB) -o $@
endif

test:
ifdef WinEnv
	echo %JRE_LIBJVM%
else
	echo $$JRE_LIBJVM
endif
	$(PYTHON) test.py

testgui:
	$(PYTHON) samples/TestDND.py
#	cd samples && $(PYTHON) TestDND.py

testjava:
	$(JAVA) jpetest.test

testjunit:
	$(JAVA) junit.textui.TestRunner jpetest.pythontest

docs:
	cd doc && $(MAKE)

ifndef WinEnv
pyshared: $(PYLIB)

cleanpysh:
	$(RM) -f $(PYLIB)

newpyshared:
	$(MAKE) cleanpysh
	$(MAKE) pyshared

SHBUILDDIR=$(PYSRCDIR)/pyshlib

$(PYLIB): $(PYSRCDIR)/$(LIBPREF)python2.1.a
	$(RM) -rf $(SHBUILDDIR)
	mkdir $(SHBUILDDIR)
	cd $(SHBUILDDIR) && ar x $<
	cd $(SHBUILDDIR) && ld -shared -export-dynamic -o $@ *.o\
 -lpthread -ldl -lutil -lm -lc
endif


More information about the Python-list mailing list