Salome HOME
Fix a bug of make procedure: copy Plugin file (generated from resources/Plugin.in...
[modules/kernel.git] / Makefile.in
1 # -* Makefile *- 
2 #
3 # Author : Patrick GOLDBRONN (CEA)
4 # Date : 28/06/2001
5 # $Header$
6 #
7
8 # source path
9 top_srcdir=@top_srcdir@
10 top_builddir=.
11 srcdir=@srcdir@
12 VPATH=.:@srcdir@:@top_srcdir@/bin:./bin/salome:@top_srcdir@/resources:./bin:@top_srcdir@/idl
13
14
15 @COMMENCE@
16
17 SUBDIRS = idl src examples doc salome_adm
18
19 RESOURCES_FILES = \
20 CatalogDataType.xml \
21 KERNELCatalog.xml \
22 CatalogRessources.xml \
23 config \
24 channel.cfg \
25 SALOMEDS_Resources
26
27 BIN_SCRIPT= \
28 runIDLparser \
29 VERSION \
30 orbmodule.py \
31 runSalome.py \
32 killSalome.py \
33 killSalomeWithPort.py \
34 runSalome \
35 runSalome.csh \
36 runNS.sh \
37 launchConfigureParser.py \
38 salome.launch \
39 envSalome.py \
40 salomeConsole.py \
41 showNS.py
42
43 # copy header files in common directory
44 OWN_CONFIG_H=@OWN_CONFIG_H@
45
46 ifeq ($(OWN_CONFIG_H),yes)
47     ifeq ($(HAVE_SSTREAM),yes)
48         include_list=include/salome/SALOMEconfig.h include/salome/config.h
49     else
50         include_list=include/salome/SALOMEconfig.h include/salome/config.h include/salome/sstream
51     endif
52 else
53     ifeq ($(HAVE_SSTREAM),yes)
54         include_list=include/salome/SALOMEconfig.h
55     else
56         include_list=include/salome/SALOMEconfig.h include/salome/sstream
57     endif
58 endif
59
60 inc: idl $(include_list)
61
62 include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
63         -$(RM) $@
64         $(LN_S) ../../$< $@
65
66 # test if SALOMEconfig.h has changed (contents)
67 salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
68         @if ! [ -a $@ ]; then \
69           cp -p $< $@;        \
70         fi;                   \
71         if ! cmp $< $@; then  \
72           cp -p $< $@;        \
73         fi;                   \
74
75 include/salome/config.h: salome_adm/unix/config.h
76         -$(RM) $@
77         $(LN_S) ../../$< $@
78
79 include/salome/sstream: salome_adm/unix/sstream
80         -$(RM) $@
81         $(LN_S) ../../$< $@
82
83 depend: depend_idl
84
85 depend_idl:
86         (cd idl ; $(MAKE) $@) || exit 1
87
88 # doc is already build : if you want to had documents, go manually to doc and run 'make doc'
89 #doc:
90 #       (cd doc && $(MAKE) $@) || exit 1
91
92 # Install make_commence make_conclude ... for other modules
93 install-make:
94         ($(INSTALL) -d  $(incmakedir) || exit 1);
95         (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_commence > $(incmakedir)/make_commence || exit 1);
96         (sed 's/^prefix=/#prefix=/' $(top_builddir)/salome_adm/unix/make_conclude > $(incmakedir)/make_conclude || exit 1);
97
98
99 install-end:
100 # finish libtool install
101 #       @$(LT) --mode=finish $(libdir)
102
103 install-include: $(include_list)
104         $(INSTALL) -d  $(includedir)
105         @for f in X $(include_list); do                         \
106            if test $$f != X; then                               \
107              (cp -p $$f $(includedir) || exit 1);               \
108            fi;                                                  \
109         done
110
111 # install script in $(bindir) :
112 install-bin: $(BIN_SCRIPT)
113         $(INSTALL) -d  $(bindir)
114         $(INSTALL_PROGRAM) $^ $(bindir)
115
116 # install Plugin file
117 install-plugin: $(top_builddir)/share/salome/resources/Plugin
118         ($(INSTALL_DATA) $^ $(datadir)/resources/. || exit 1); \
119        
120 uninstall: uninstall-idl
121
122 uninstall-idl:
123         $(RM) $(idldir)/*.idl
124
125 distclean: distclean-other
126
127 distclean-other:
128         -$(RM) salome_adm/unix/*~ salome_adm/unix/*% salome_adm/unix/*.bak salome_adm/unix/*.new salome_adm/unix/*.old
129         -$(RM) salome_adm/unix/make_* 
130         -$(RM) salome_adm/unix/depend salome_adm/unix/SALOMEconfig.h salome_adm/unix/config.h 
131         -$(RM) config.cache config.log config.status 
132
133 @MODULE@
134
135 $(top_builddir)/share/salome/resources/Plugin: resources/Plugin
136         cp -f $< $@ ; \
137
138 resources: $(top_builddir)/share/salome/resources/Plugin
139
140 install: install-bin install-include install-make install-plugin install-end
141