]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix compilation of GHS3DPLUGIN on Mandrake: pb in using path with .. as regexp
authoreap <eap@opencascade.com>
Mon, 27 Jun 2005 13:15:55 +0000 (13:15 +0000)
committereap <eap@opencascade.com>
Mon, 27 Jun 2005 13:15:55 +0000 (13:15 +0000)
salome_adm/unix/depend.in

index 09a46645aa9c0dafd232ff6fbe35c95e1004a1a3..080bf9a17c5183714b8d8e413ad91de66d150351 100644 (file)
@@ -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;                                                           \