From 4745cd5e67663776d94e31a862398761d2f979b6 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 27 Jun 2005 13:15:55 +0000 Subject: [PATCH] Fix compilation of GHS3DPLUGIN on Mandrake: pb in using path with .. as regexp --- salome_adm/unix/depend.in | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/salome_adm/unix/depend.in b/salome_adm/unix/depend.in index 09a46645a..080bf9a17 100644 --- a/salome_adm/unix/depend.in +++ b/salome_adm/unix/depend.in @@ -32,6 +32,11 @@ $(srcdir)/Dependencies: .depend depend:.depend +# when use the path as regexp, prevent taking "." for "any symbol" +srcdir_re = $(subst .,[.],$(srcdir)) +top_srcdir_re = $(subst .,[.],$(top_srcdir)) +top_builddir_re = $(subst .,[.],$(top_builddir)) + # we had Makefile target, because we want Makefile rebuild before include .depend .depend: $(LIB_DEP) $(TEST_SRC) $(BIN_DEP) @touch .depend @@ -44,9 +49,9 @@ depend:.depend obj=`basename $$dep .c`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ $(CC) $(C_DEPEND_FLAG) $(CPPFLAGS) $$dep 2>/dev/null | \ - sed 's% $(srcdir)/% $$(srcdir)/%g' | \ - sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ - sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ + sed 's% $(srcdir_re)/% $$(srcdir)/%g' | \ + sed 's% $(top_srcdir_re)/% $$(top_srcdir)/%g' | \ + sed 's% $(top_builddir_re)/% $$(top_builddir)/%g' | \ sed 's/\.o/.lo/' >>$@; \ ;; \ *.cc) \ @@ -54,9 +59,9 @@ depend:.depend obj=`basename $$dep .cc`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ - sed 's% $(srcdir)/% $$(srcdir)/%g' | \ - sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ - sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ + sed 's% $(srcdir_re)/% $$(srcdir)/%g' | \ + sed 's% $(top_srcdir_re)/% $$(top_srcdir)/%g' | \ + sed 's% $(top_builddir_re)/% $$(top_builddir)/%g' | \ sed 's/\.o/.lo/' >>$@; \ ;; \ *.cxx) \ @@ -64,9 +69,9 @@ depend:.depend obj=`basename $$dep .cxx`.lo; \ sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@; \ $(CXX) $(CXX_DEPEND_FLAG) $(CXXFLAGS) $(CPPFLAGS) $$dep 2>/dev/null | \ - sed 's% $(srcdir)/% $$(srcdir)/%g' | \ - sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' | \ - sed 's% $(top_builddir)/% $$(top_builddir)/%g' | \ + sed 's% $(srcdir_re)/% $$(srcdir)/%g' | \ + sed 's% $(top_srcdir_re)/% $$(top_srcdir)/%g' | \ + sed 's% $(top_builddir_re)/% $$(top_builddir)/%g' | \ sed 's/\.o/.lo/' >>$@; \ ;; \ esac; \ -- 2.39.2