Salome HOME
4d3ce9c9e76e2c4c969a45a2e4d4224b0d378211
[samples/component.git] / idl / Makefile.in
1 #  Copyright (C) 2005  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 #
20 # generate dependencies for idl file :
21 #
22
23 # source path
24 top_srcdir=@top_srcdir@
25 top_builddir=..
26 srcdir=@srcdir@
27 VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
28
29 @COMMENCE@
30
31 IDL_FILES = \
32   AddComponent.idl \
33   AdditionComponent.idl \
34   DivComponent.idl \
35   FactorialComponent.idl \
36   MulComponent.idl \
37   SubComponent.idl \
38   SyrComponent.idl \
39   SyrControlComponent.idl \
40   TypesCheck.idl \
41   DataStreamComponent.idl \
42   SIGNALSComponent.idl \
43   UndefinedSymbolComponent.idl \
44   Calculator.idl
45
46 PY_CLIENT_IDL = $(IDL_FILES)
47
48 # we copy all idl file in $(top_builddir)/idl
49 inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
50
51 $(top_builddir)/idl/salome:
52         mkdir $@
53
54 $(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
55 #       $(CP) $< $@
56         cp -f $^ $(top_builddir)/idl/salome
57
58
59 lib: pyidl
60
61 PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
62
63 pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
64
65 $(PYTHON_BUILD_SITE):
66         $(INSTALL) -d  $@
67
68 $(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
69         $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
70
71
72 # install python client (generated from idl file
73 install: install-pyidl install-idl
74
75 # create directory $(idldir) and copy idl files into it
76 install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
77         $(INSTALL) -d  $(idldir)
78         $(INSTALL_DATA) $^ $(idldir)
79
80
81 install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
82         $(INSTALL) -d  $(PYTHON_SITE_INSTALL)
83         @for file in $^ dummy; do \
84           if [ $$file != "dummy" ]; then \
85             $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
86           fi ; \
87         done ;
88
89 #@ CONCLUDE @
90
91 cleandep:
92         -$(RM) .dep*
93
94 distclean:
95         -$(RM) *.py
96         -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
97         -$(RM) Makefile
98