File: Makefile.am

package info (click to toggle)
babel 0.10.2-1
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 43,932 kB
  • ctags: 29,707
  • sloc: java: 74,695; ansic: 73,142; cpp: 40,649; sh: 18,411; f90: 10,062; fortran: 6,727; python: 6,406; makefile: 3,866; xml: 118; perl: 48
file content (86 lines) | stat: -rw-r--r-- 2,390 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
##
## File:        Makefile.am
## Package:     Babel Hello example
## Copyright:   (c) 2000-2001 The Regents of the University of California
## Revision:    $Revision: 4434 $
## Modified:    $Date: 2005-03-17 09:05:29 -0800 (Thu, 17 Mar 2005) $
## Description: automake makefile for python hello world client
##

AUTOMAKE_OPTIONS = foreign no-dependencies no-installinfo	\
                   no-installman no-texinfo.tex 1.7

PYTHONISHFILES = helloclient.py runPy2C runPy2Cxx runPy2F77

BABELDIR=$(top_builddir)
INCLUDEDIR=$(top_builddir)/runtime/sidl
INCLUDEDIR2=.
PYTHONDIR=$(top_builddir)/runtime/python
PYINCLUDEDIR=$(PYTHONDIR)
SIDLPYTHONLIB=$(top_builddir)/runtime/sidl/.libs
PYTHONLIB=@PYTHONLIB@


check-local: python-support

if SUPPORT_PYTHON
python-support: setup.py

setup.py:
	$(SHELL) $(BABELDIR)/bin/babel --client=python \
		$(srcdir)/../Hello.sidl
	if test "X$(srcdir)" != "X."; then				  \
	  for file in $(PYTHONISHFILES); do				  \
	    d=`dirname $$file`;						  \
	    test -f $$d							  \
	    || mkdir -p $$d						  \
	    || exit 1;							  \
	    cp -pf $(srcdir)/$$file $$file;				  \
	  done;								  \
	fi;								  \
	if ! test -d Hello; then mkdir -p Hello || exit 1; fi;		  \
	$(PYTHON) setup.py \
	  --include-dirs=`cd $(PYINCLUDEDIR) && pwd`		\
	  --include-dirs=`cd $(INCLUDEDIR) && pwd`		\
	  --include-dirs=`cd $(INCLUDEDIR2) && pwd`		\
	  --library-dirs=`cd $(SIDLPYTHONLIB) && pwd`		\
	  $(PYTHON_SETUP_ARGS)                                  \
	  build_ext --inplace

clean-local:
	if test -d Hello; then						\
	  cd Hello;							\
	  rm -f setscript Makefile Makefile.pre Makefile.pre.in Setup config.c;		\
	  rm -f *.so *.o *.o *~;					\
	fi
	if test -d build; then \
	   rm -rf build; \
	fi
	rm -f setup.py

distclean-local:
	rm -f setup.py
	if test "X$(srcdir)" != "X."; then				\
	  rm -f $(PYTHONISHFILES) babel.make;				\
	  rm -f *_IOR.h *_IOR.c;					\
	  rm -f Hello/*_Module.c ;			\
	  rm -f Hello/Setup.in Hello/__init__.* Hello/babel.make ;	\
	  rm -f Hello/Makefile.pre.in Hello/sedscript ;			\
	  rm -f *_Module.h ;						\
	fi

else
python-support:
	@echo "Python not supported"
clean-local:
distclean-local:
endif

dist-hook:
	for file in $(PYTHONISHFILES); do				\
	  d=`dirname $(distdir)/$$file`; 				\
	  test -f $$d							\
	  || mkdir -p $$d						\
	  || exit 1;							\
	  cp -pf $(srcdir)/$$file $(distdir)/$$file;			\
	done