#6948 closed enhancement (fixed)
Java bindings : add a target to main makefile.vc
Reported by: | bugbuster | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 2.2.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
This patch adds two targets to the main makefile.vc
(for Windows) in order to compile Java bindings :
java
java_install
Attachments (2)
Change History (8)
by , 7 years ago
Attachment: | diff_makefile.patch added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
About your 1st comment: you may be right. I just used the target we have been using on our project for a while. And I am not a Java specialist :-/
About your 2nd comment: you are definitely right. I was just not able to test other bindings in my Windows configuration (Windows 8 64 bits, Visual C++ 2015 64 bits)
Just to mention it, I have tried to compile the python bindings. It took me some time to find out a python installation which is compatible with my compiler (see http://p-nand-q.com/python/building-python-27-with-visual_studio.html). Furthermore, I do not know exactly what should be "installed" for python bindings.
comment:3 by , 7 years ago
I don't necessarily request that you make the job for other bindings, but at least some "framework" so that it can potentially be used for others.
Normally for Python, "$(PYDIR)\python.exe setup.py install" (after the build) should be sufficient. Possibly with a --prefix= switch to avoid installing directly in the directory of the Python installation.
comment:4 by , 7 years ago
I have completed the proposed patch :
- nmake.opt : new variable
BINDINGS
for the list of bindings we want to generate, - makefile.vc : three new targets
bindings
,bindings_install
andbindings_clean
, - swig/makefile.vc : three new targets
python_install
,csharp_install
andjava_install
, - swig/java/makefile.vc : new target
ìnstall
.
Note : I have only tested java
and python
targets
by , 7 years ago
Attachment: | git_diff_bindings.patch added |
---|
comment:6 by , 7 years ago
I've applied your patch in trunk r39499 with just commenting out BINDINGS, so that people redefine it in their nmake.local with appropriate values. Thanks !
Do we really need those 2 steps :
The .java files in swig/java are just used as templates to build the javadoc. And the content of swig/java/org is compressed in gdal.jar ultimately
Regarding the top level makefile.vc and swig/makefile.vc, I think what could be nice instead of having Java specific stuff there, is to have a "bindings" and "install-bindings" target that would use a BINDINGS variable that would be set in nmake.opt / nmake.local and could list the various languages to build.