Salome HOME
PR: preserves files dates when copying from sources and avoids unnecessary compilatio...
[modules/kernel.git] / idl / Makefile.in
1 #
2 # generate dependencies for idl file :
3 #
4
5 # source path
6 top_srcdir=@top_srcdir@
7 top_builddir=..
8 srcdir=@srcdir@
9 VPATH=.:$(srcdir)
10
11 @COMMENCE@
12
13 IDL_FILES = \
14   SALOME_Exception.idl \
15   SALOME_ModuleCatalog.idl \
16   SALOME_DataTypeCatalog.idl \
17   SALOME_RessourcesCatalog.idl \
18   SALOMEDS.idl \
19   SALOMEDS_Attributes.idl \
20   SALOME_Session.idl \
21   SALOME_Component.idl \
22   SALOME_TestComponent.idl \
23   SALOME_Registry.idl \
24   TypeData.idl \
25   MPIObject.idl \
26   MPIContainer.idl \
27   Logger.idl
28
29 PY_CLIENT_IDL = $(IDL_FILES)
30
31 # we copy all idl file in $(top_builddir)/idl
32 inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
33
34 $(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
35 #       $(CP) $< $@
36         cp -f $< $@
37
38
39 lib: pyidl
40
41 PYTHON_BUILD_SITE=$(top_builddir)/lib/python$(PYTHON_VERSION)/site-packages/@PACKAGE@
42
43 pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
44
45 $(PYTHON_BUILD_SITE):
46         $(INSTALL) -d  $@
47
48 $(PYTHON_BUILD_SITE)/%_idl.py: %.idl
49         $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
50
51
52 # install python client (generated from idl file
53 install: install-pyidl install-idl
54
55 # create directory $(idldir) and copy idl files into it
56 install-idl: $(IDL_FILES)
57         $(INSTALL) -d  $(idldir)
58         cp -p $^ $(idldir)
59
60
61 install-pyidl: $(IDL_FILES)
62         $(INSTALL) -d  $(PYTHON_SITE_INSTALL)
63         @for file in $^ dummy; do \
64           if [ $$file != "dummy" ]; then \
65             $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_SITE_INSTALL) $$file ; \
66           fi ; \
67         done ;
68
69 #@ CONCLUDE @
70
71 cleandep:
72         -$(RM) .dep*
73
74 distclean:
75         -$(RM) *.py
76         -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
77         -$(RM) Makefile
78