root/trunk/bindings/python/Makefile.am

Revision 1462, 2.0 KB (checked in by Freddie Akeroyd, 4 months ago)

Set NEXUSLIB when using pydoc. Refs #220

  • Property svn:executable set to *
Line 
1## Process this file with automake to produce Makefile.in
2#====================================================================
3#  NeXus - Neutron & X-ray Common Data Format
4
5#  $Id: Makefile.am 715 2005-12-16 18:11:19Z faa59 $
6
7#  Makefile for NeXus python bindings
8#
9#  Copyright (C) 2008 Freddie Akeroyd
10
11#  This library is free software; you can redistribute it and/or
12#  modify it under the terms of the GNU Lesser General Public
13#  License as published by the Free Software Foundation; either
14#  version 2 of the License, or (at your option) any later version.
15#
16#  This library is distributed in the hope that it will be useful,
17#  but WITHOUT ANY WARRANTY; without even the implied warranty of
18#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19#  Lesser General Public License for more details.
20#
21#  You should have received a copy of the GNU Lesser General Public
22#  License along with this library; if not, write to the Free
23#  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24#  MA  02111-1307  USA
25#             
26#  For further information, see <http://www.neutron.anl.gov/NeXus/>
27#
28#
29#====================================================================
30
31pydocdir        = $(NXDOCDIR)/python
32pydoc_DATA      = README.html nxs.napi.html
33#nxspythondir   = $(pkgpythondir)/nxs
34nxspythondir    = $(pythondir)/nxs
35#pkgpython_PYTHON = nxstest.py
36nxspython_PYTHON = nxs/__init__.py nxs/napi.py
37EXTRA_DIST      = README.html nxs.napi.html nxstest.py run_nxstest setup.py
38
39nxs.napi.html : $(srcdir)/nxs/napi.py
40        env NEXUSLIB=../../src/.libs/libNeXus.so pydoc -w $(srcdir)/nxs/napi.py
41        mv napi.html $@
42
43install-data-hook :
44        sed -e "s|nxprefix = .*|nxprefix = \'${prefix}\'|" < ${srcdir}/nxs/napi.py > $(DESTDIR)${nxspythondir}/napi.py
45        if test -z "$(DESTDIR)"; then \
46            $(py_compile) --basedir "$(nxspythondir)" napi.py; \
47        else \
48            $(py_compile) --destdir "$(DESTDIR)" --basedir "$(nxspythondir)" napi.py; \
49        fi
50
51# python setup.py install --root=$(DESTDIR)
52CLEANFILES=nxs.napi.html
53
54include $(top_srcdir)/build_rules.am
Note: See TracBrowser for help on using the browser.