Salome HOME
Update copyright information
[modules/filter.git] / idl / Makefile.in
1 #  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
2 #
3 #  This library is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU Lesser General Public
5 #  License as published by the Free Software Foundation; either
6 #  version 2.1 of the License.
7 #
8 #  This library is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 #  Lesser General Public License for more details.
12 #
13 #  You should have received a copy of the GNU Lesser General Public
14 #  License along with this library; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # generate dependencies for idl file :
20 # source path
21 #
22 top_srcdir=@top_srcdir@
23 top_builddir=..
24 srcdir=@srcdir@
25 VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
26
27 @COMMENCE@
28
29 IDL_FILES = \
30   FILTER_Gen.idl
31
32 PY_CLIENT_IDL = $(IDL_FILES)
33
34 # we copy all idl file in $(top_builddir)/idl
35 inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
36
37 $(top_builddir)/idl/salome:
38         mkdir $@
39
40 $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
41 #       $(CP) $< $@
42         cp -f $^ $(top_builddir)/idl/salome
43
44
45 lib: pyidl
46
47 PYTHON_BUILD_SITE=$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
48
49 pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
50
51 $(PYTHON_BUILD_SITE):
52         $(INSTALL) -d  $@
53
54 $(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
55         $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
56
57
58 # install python client (generated from idl file
59 install: install-pyidl install-idl
60
61 # create directory $(idldir) and copy idl files into it
62 install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
63         $(INSTALL) -d  $(idldir)
64         $(INSTALL_DATA) $^ $(idldir)
65
66
67 install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
68         $(INSTALL) -d  $(PYTHON_SITE_INSTALL)
69         @for file in $^ dummy; do \
70           if [ $$file != "dummy" ]; then \
71             $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
72           fi ; \
73         done ;
74
75 #@ CONCLUDE @
76
77 cleandep:
78         -$(RM) .dep*
79
80 distclean:
81         -$(RM) *.py
82         -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
83         -$(RM) Makefile
84