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 (258 lines) | stat: -rw-r--r-- 9,400 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
##
## File:        Makefile.am 
## Package:     Babel makefiles
## Revision:    $Revision: 4434 $
## Modified:    $Date: 2005-03-17 09:05:29 -0800 (Thu, 17 Mar 2005) $
## Description: automake makefile to build the runtime library
##
## Copyright (c) 2000-2002, The Regents of the University of Calfornia.
## Produced at the Lawrence Livermore National Laboratory.
## Written by the Components Team <components@llnl.gov>
## UCRL-CODE-2002-054
## All rights reserved.
## 
## This file is part of Babel. For more information, see
## http://www.llnl.gov/CASC/components/. Please read the COPYRIGHT file
## for Our Notice and the LICENSE file for the GNU Lesser General Public
## License.
## 
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License (as published by
## the Free Software Foundation) version 2.1 dated February 1999.
## 
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
## conditions of the GNU Lesser General Public License for more details.
## 
## You should have recieved a copy of the GNU Lesser General Public License
## along with this program; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

if WITH_SIDLX
SIDLX_SUBDIR=sidlx
else
SIDLX_SUBDIR=
endif

SUBDIRS = m4 bin config sidl java $(SIDLX_SUBDIR)

#
# Unfortuntately, Python uses its own makefile system so we have to 
# deal with it explicitly here in the parent directory instead of
# integrating it inside automake.
#

if SUPPORT_CYGWIN
SO = dll
else
SO = so
endif

PYTHONLIB = @PYTHONLIB@
PYTHONISHFILES = python/sidlObjA.h python/sidlObjA.c			\
		 python/sidlPyArrays.h python/sidlPyArrays.c		\
		 python/sidlsetup.py python/__init__.py

RUNTIME_ONLY_FILES=python/sidl/__init__.py \
		python/sidl/BaseClass_Module.c \
		python/sidl/BaseException_Module.c \
		python/sidl/BaseInterface_Module.c \
		python/sidl/DLL_Module.c \
		python/sidl/Loader_Module.c \
		python/sidl/sidlException_Module.c \
		python/sidl_BaseClass_Module.h \
		python/sidl_BaseException_Module.h \
		python/sidl_BaseInterface_Module.h \
		python/sidl_DLL_Module.h \
		python/sidl_Loader_Module.h \
		python/sidl_SIDLException_Module.h \
		python/sidl_BaseClass_IOR.h python/sidl_BaseClass_IOR.c \
		python/sidl_BaseException_IOR.h python/sidl_BaseException_IOR.c \
		python/sidl_BaseInterface_IOR.h python/sidl_BaseInterface_IOR.c \
		python/sidl_DLL_IOR.h python/sidl_DLL_IOR.c \
		python/sidl_SIDLException_IOR.h python/sidl_SIDLException_IOR.c \
		python/sidl_Loader_IOR.h python/sidl_Module_IOR.c \
		python/setup.py

if BABEL_RUNTIME_ONLY
babelpythonsrc=$(srcdir)
all-local-python: all-local-python2
clean-local-python: clean-local-python2
else
babelpythonsrc=.
all-local-python: all-local-python1
clean-local-python: clean-local-python1
endif

dist-hook: sidl/libsidl.la dist-hook-python

if SUPPORT_PYTHON
all-local: all-local-python
clean-local: clean-local-python
install-data-am: install-data-am-python
uninstall-am: uninstall-data-am-python
else
all-local clean-local install-data-am uninstall-am:
	@echo "Python not supported"
endif

sidl/libsidl.la:
	@-cd sidl && $(MAKE) libsidl.la

all-local-python1: python/babel-stamp
python/babel-stamp: $(PYTHONISHFILES)
	@-if ! test -d python; then mkdir -p python || exit 1; fi
	@-if ! test -d python/sidl; then mkdir -p python/sidl || exit 1; fi
	@-if test "X$(srcdir)" != "X."; then				\
	  for file in $(PYTHONISHFILES); do				\
	    d=`dirname $$file`;						\
	    test -f $$d							\
	    || mkdir -p $$d						\
	    || exit 1;							\
	    echo cp -p $(srcdir)/$$file $$file;				\
	    cp -p $(srcdir)/$$file $$file;				\
	  done;								\
	fi
	@if test -d python; then					\
	  abspath=`cd $(srcdir) && pwd`;				\
	  cd python;							\
	  echo $(SHELL) ../../bin/babel --suppress-timestamp -!		\
	    --generate-sidl-stdlib -cpython				\
	    $$abspath/sidl/sidl.sidl;					\
	  $(SHELL) ../../bin/babel --suppress-timestamp	 -!		\
	    --generate-sidl-stdlib -cpython  				\
	    $$abspath/sidl/sidl.sidl;					\
	  $(PYTHON) sidlsetup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../sidl --include-dirs=../config  $(PYTHON_SETUP_ARGS) build_ext   \
	   --inplace;					\
	  $(PYTHON) setup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../sidl --include-dirs=../config $(PYTHON_SETUP_ARGS) build_ext 	\
	   --inplace;							\
	fi
	touch python/babel-stamp

all-local-python2: python/babel-stamp2
python/babel-stamp2:
	@-if ! test -d python; then mkdir -p python || exit 1; fi
	@-if ! test -d python/sidl; then mkdir -p python/sidl || exit 1; fi
	@-if test "X$(srcdir)" != "X."; then				\
	  for file in $(PYTHONISHFILES) $(RUNTIME_ONLY_FILES); do	\
	    d=`dirname $$file`;						\
	    test -f $$d							\
	    || mkdir -p $$d						\
	    || exit 1;							\
	    echo cp -p $(srcdir)/$$file $$file;				\
	    cp -p $(srcdir)/$$file $$file;				\
	  done;								\
	fi
	@if test -d python; then					\
	  cd python;							\
	  $(PYTHON) sidlsetup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../$(srcdir)/sidl --include-dirs=../config $(PYTHON_SETUP_ARGS)  build_ext   \
	   --inplace;					\
	  $(PYTHON) setup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../$(srcdir)/sidl --include-dirs=../config $(PYTHON_SETUP_ARGS)  build_ext 	\
	   --inplace;					\
	fi
	touch python/babel-stamp2

clean-local-python1:
	@if test -d python; then					\
          cd python;                                                    \
          echo rm -f sedscript Makefile Makefile.pre Makefile.pre.in    \
            Setup config.c *setup.installed;                            \
          rm -f sedscript Makefile Makefile.pre Makefile.pre.in Setup   \
             config.c *setup.installed;         			\
          echo rm -f babel-stamp *.so *.dll *.a *.o *~;                 \
	  rm -f babel-stamp *.so *.dll *.a *.o *~;			\
	  echo rm -f sidl_*IOR.* sidl_*_Module.h setup.py babel.make ;	\
	  rm -f sidl_*IOR.* sidl_*_Module.h setup.py babel.make ;	\
	  if test -d sidl; then						\
	    cd sidl;							\
	    echo rm -f config.c *.so *.dll *.a *.o *~ *.c *.h __init__.*;\
	    rm -f config.c *.so *.dll *.a *.o *~ *.c *.h __init__.*;	\
	    echo rm -f babel.make ; 					\
	    rm -f babel.make ; 						\
	  fi;								\
	fi
	@-if test "X$(srcdir)" != "X."; then				\
	  echo rm -rf python;					\
	  rm -rf python;						\
	else \
	  echo rm -rf python/build; \
	  rm -rf python/build; \
	fi

clean-local-python2:
	@if test -d python; then					\
          cd python;                                                    \
          echo rm -f sedscript Makefile Makefile.pre Makefile.pre.in    \
            Setup config.c *setup.installed;                            \
          rm -f sedscript Makefile Makefile.pre Makefile.pre.in Setup   \
             config.c *setup.installed;         			\
          echo rm -f babel-stamp *.so *.dll *.a *.o *~;                 \
	  rm -f babel-stamp *.so *.dll *.a *.o *~;			\
	  echo rm -f sidl_*IOR.* sidl_*_Module.h setup.py babel.make ;	\
	  rm -f sidl*IOR.* sidl_*_Module.h setup.py babel.make ;	\
	  if test -d sidl; then						\
	    cd sidl;							\
	    echo rm -f config.c *.so *.dll *.a *.o *~ babel.make ;	\
	    rm -f config.c *.so *.dll *.a *.o *~ babel.make ;		\
	  fi;								\
	fi
	@-if test "X$(srcdir)" != "X."; then				\
	  echo rm -rf python;					\
	  rm -rf python;						\
	else \
	  echo rm -rf python/build; \
	  rm -rf python/build; \
	fi

dist-hook-python: all-local-python
	@for file in $(PYTHONISHFILES); do				\
	  d=`dirname $(distdir)/$$file`;				\
	  test -f $$d							\
	  || mkdir -p $$d						\
	  || exit 1;							\
	  echo cp -p $(srcdir)/$$file $(DESTDIR)$(distdir)/$$file;	\
	  cp -p $(srcdir)/$$file $(DESTDIR)$(distdir)/$$file;		\
	done
	@for file in $(RUNTIME_ONLY_FILES); do				\
	  d=`dirname $(distdir)/$$file`;				\
	  test -f $$d							\
	  || mkdir -p $$d						\
	  || exit 1;							\
	  echo cp -p $$file $(DESTDIR)$(distdir)/$$file;		\
	  cp -p $$file $(DESTDIR)$(distdir)/$$file;			\
	done

install-data-am-python:
	@$(NORMAL_INSTALL)
	test -d python || exit 1
	cd python ;							\
	$(PYTHON) sidlsetup.py --library-dirs=../sidl/.libs \
	 --include-dirs=../$(babelpythonsrc)/sidl --include-dirs=../config      \
	 $(PYTHON_SETUP_ARGS) build_ext;		\
	$(PYTHON) setup.py --library-dirs=../sidl/.libs \
	 --include-dirs=../$(babelpythonsrc)/sidl --include-dirs=../config 	\
	 $(PYTHON_SETUP_ARGS) build_ext;		\
	$(PYTHON) sidlsetup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../sidl --include-dirs=../config install 	\
	   $(PYTHON_SETUP_ARGS) 					\
	   --prefix=$(DESTDIR)$(prefix) 				\
	   --exec-prefix=$(DESTDIR)$(exec_prefix)			\
	   --record=sidlsetup.installed;		\
	$(PYTHON) setup.py --library-dirs=../sidl/.libs \
	   --include-dirs=../sidl  --include-dirs=../config install  	\
	   $(PYTHON_SETUP_ARGS) 					\
	   --prefix=$(DESTDIR)$(prefix) 				\
	   --exec-prefix=$(DESTDIR)$(exec_prefix)			\
	   --record=setup.installed

uninstall-data-am-python:
	@$(NORMAL_UNINSTALL)
	@test -d python && test -f python/setup.installed &&		\
	 rm -f `cat python/setup.installed`
	@test -d python && test -f python/sidlsetup.installed &&	\
	 rm -f `cat python/sidlsetup.installed`