Salome HOME
To see which hdf5 we're using in configure log
[modules/kernel.git] / salome_adm / unix / DEPRECATED / make_module.in
index fdf28b1811b9a979ec1ebd350bd45f1991a6d19f..2b9fc76b864bc428205b15d6f68a961339a39692 100644 (file)
@@ -1,7 +1,28 @@
+#  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+#
+#  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+#  This library 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; either
+#  version 2.1 of the License.
+#
+#  This library 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 GNU
+#  Lesser General Public License for more details.
+#
+#  You should have received a copy of the GNU Lesser General Public
+#  License along with this library; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+#  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 # generic rule to put in top module Makefile 
 # (for example with module SALOME, SALOME/Makefile.in and SALOME/src/Makefile.in)
-
 # build all lib in all subdir
+#
 lib:$(SUBDIRS:%=lib_%)
 
 $(SUBDIRS:%=lib_%):lib_%:%
@@ -48,14 +69,17 @@ depend:
 RESOURCES_FILES_ALL := $(notdir $(wildcard $(srcdir)/resources/*))
 RESOURCES_FILES_ALL := $(filter-out CVS, $(RESOURCES_FILES_ALL))
 RESOURCES_FILES_ALL := $(filter-out %.po, $(RESOURCES_FILES_ALL))
+RESOURCES_FILES_ALL := $(filter-out %.in, $(RESOURCES_FILES_ALL))
 RESOURCES_FILES ?= $(RESOURCES_FILES_ALL)
 
-resources: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%)
+resources: resources-cp
        @@SETX@; for d in $(SUBDIRS); do        \
           (cd $$d && $(MAKE) $@) || exit 1;    \
        done
 
-$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%): $(top_builddir)/share/salome/resources/% : %
+resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
+
+$(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%): $(top_builddir)/share/salome/resources/$(MODULE_NAME)/% : %
        cp -fr $< $@;
 
 #data:
@@ -101,15 +125,15 @@ distclean: clean
        @@SETX@; for d in $(SUBDIRS); do        \
           (cd $$d && $(MAKE) $@) || exit 1;    \
        done
-       -$(RM) $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%)
+       -$(RM) $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%)
        -$(RM) Makefile
 
-install-resources:
+install-resources: resources-cp
 # one resources directory for all salome modules
-       $(INSTALL) -d $(datadir)/resources
-       for f in X $(RESOURCES_FILES:%=$(srcdir)/resources/%); do \
+       $(INSTALL) -d $(datadir)/resources/$(MODULE_NAME)
+       @for f in X $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/$(MODULE_NAME)/%); do \
           if test $$f != X; then                                                        \
-            ($(INSTALL_DATA) $$f $(datadir)/resources/. || exit 1);                     \
+            ($(INSTALL_DATA) $$f $(datadir)/resources/$(MODULE_NAME)/. || exit 1);                      \
           fi;                                                                           \
        done
 
@@ -117,7 +141,7 @@ install-resources:
 uninstall-resources:
        @for f in X $(RESOURCES_FILES); do            \
           if test $$f != X; then                                             \
-            $(LT_UNINSTALL) $(datadir)/resources/$$f ;                       \
+            $(LT_UNINSTALL) $(datadir)/resources/$(MODULE_NAME)/$$f ;                        \
           fi;                                                                \
        done