From 501da6017443ece219f0d385dfe5cadfa0312fce Mon Sep 17 00:00:00 2001 From: asv Date: Tue, 30 Aug 2005 06:19:41 +0000 Subject: [PATCH] improvement to building of resources: 1) if "RESOURCES_FILES" variable is NOT defined in Makefile.in, then ALL files from srcdir/resources are copied to builddir/share/salome/resources 2) including directories ("cp -fr" is used) 3) except "CVS" directory --- salome_adm/unix/make_conclude.in | 7 ++++++- salome_adm/unix/make_module.in | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/salome_adm/unix/make_conclude.in b/salome_adm/unix/make_conclude.in index 227bf1634..338fed0cf 100644 --- a/salome_adm/unix/make_conclude.in +++ b/salome_adm/unix/make_conclude.in @@ -152,6 +152,9 @@ $(DEST_HEADERS): $(inc_builddir)/%: % cp -f $< $@ # build resources file (icons and messages) : .qm file from .po file +RESOURCES_FILES_ALL = $(notdir $(wildcard $(srcdir)/resources/*)) +RESOURCES_FILES ?= $(RESOURCES_FILES_All) + resources: resources-po resources-cp resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm) @@ -159,7 +162,9 @@ resources-po: $(PO_FILES:%.po=$(top_builddir)/share/salome/resources/%.qm) resources-cp: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%) $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%): $(top_builddir)/share/salome/resources/% : % - cp -f $< $@ + if [ $(notdir $<) != "CVS" ] ; then \ + cp -fr $< $@; \ + fi # Make installation directories if they don't exist. $(libdir) $(includedir) $(bindir) $(datadir) $(idldir) $(sharedpydir): diff --git a/salome_adm/unix/make_module.in b/salome_adm/unix/make_module.in index 2d08f49ba..bfbb3036e 100644 --- a/salome_adm/unix/make_module.in +++ b/salome_adm/unix/make_module.in @@ -45,13 +45,18 @@ depend: done # copy all resources files in common directory +RESOURCES_FILES_ALL = $(notdir $(wildcard $(srcdir)/resources/*)) +RESOURCES_FILES ?= $(RESOURCES_FILES_All) + resources: $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%) @@SETX@; for d in $(SUBDIRS); do \ (cd $$d && $(MAKE) $@) || exit 1; \ done $(RESOURCES_FILES:%=$(top_builddir)/share/salome/resources/%): $(top_builddir)/share/salome/resources/% : % - cp -f $< $@ + if [ $(notdir $<) != "CVS" ] ; then \ + cp -fr $< $@; \ + fi data: @if test "X$(top_builddir)" = "X."; then \ -- 2.39.2