]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Porting to Mandrake 10.1 and new products:
authormpv <mpv@opencascade.com>
Wed, 8 Jun 2005 04:25:31 +0000 (04:25 +0000)
committermpv <mpv@opencascade.com>
Wed, 8 Jun 2005 04:25:31 +0000 (04:25 +0000)
right 'sed' instructions to generate .depend file: '.' is "any symbol" of regexp => this symbol have to be screened, it means substituted by '.'

salome_adm/unix/depend.in

index 09a46645aa9c0dafd232ff6fbe35c95e1004a1a3..45d6d0ca0b7bc7b3f84f8af1d9fb63a36e10a46c 100644 (file)
@@ -35,7 +35,11 @@ depend:.depend
 # we had Makefile target, because we want Makefile rebuild before include .depend
 .depend: $(LIB_DEP) $(TEST_SRC) $(BIN_DEP)
        @touch .depend
-       @for dep in X $? ; do                                                 \
+       @# mpv: we have to screen substituted sed paths ('.' symbols are intrpreted by sed as 'any' symbol)
+       @sed_srcdir=`echo $(srcdir) | sed "s%\.%\\\\\.%g"`;                   \
+       sed_top_srcdir=`echo $(top_srcdir) | sed "s%\.%\\\\\.%g"`;            \
+       sed_top_builddir=`echo $(top_builddir) | sed "s%\.%\\\\\.%g"`;        \
+       for dep in X $? ; do                                                  \
           if [ $$dep != "X" ]; then                                          \
           if [ $$dep != "Makefile" ]; then                                   \
              case "$$dep" in                                                 \
@@ -44,9 +48,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% $$sed_srcdir/% \$$\(srcdir)/%g" |            \
+                        sed "s% $$sed_top_srcdir/% \$$\(top_srcdir\)/%g" |    \
+                        sed "s% $$sed_top_builddir/% \$$\(top_builddir\)/%g" | \
                        sed 's/\.o/.lo/' >>$@;                                \
                    ;;                                                        \
                 *.cc)                                                        \
@@ -54,9 +58,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% $$sed_srcdir/% \$$\(srcdir)/%g" |            \
+                        sed "s% $$sed_top_srcdir/% \$$\(top_srcdir\)/%g" |    \
+                        sed "s% $$sed_top_builddir/% \$$\(top_builddir\)/%g" | \
                        sed 's/\.o/.lo/' >>$@;                                \
                    ;;                                                        \
                 *.cxx)                                                       \
@@ -64,9 +68,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% $$sed_srcdir/% \$$\(srcdir)/%g" |            \
+                        sed "s% $$sed_top_srcdir/% \$$\(top_srcdir\)/%g" |    \
+                        sed "s% $$sed_top_builddir/% \$$\(top_builddir\)/%g" | \
                        sed 's/\.o/.lo/' >>$@;                                \
                    ;;                                                        \
              esac;                                                           \
@@ -79,5 +83,3 @@ depend:.depend
 
 # idl depend
 -include $(top_builddir)/idl/.depidl
-
-