From: mpv Date: Wed, 8 Jun 2005 04:25:31 +0000 (+0000) Subject: Porting to Mandrake 10.1 and new products: X-Git-Tag: T2_2_4a~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fb4cf1303afd3a0dc0b5200d06cf76a2093fe999;p=modules%2Fkernel.git Porting to Mandrake 10.1 and new products: right 'sed' instructions to generate .depend file: '.' is "any symbol" of regexp => this symbol have to be screened, it means substituted by '.' --- diff --git a/salome_adm/unix/depend.in b/salome_adm/unix/depend.in index 09a46645a..45d6d0ca0 100644 --- a/salome_adm/unix/depend.in +++ b/salome_adm/unix/depend.in @@ -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 - -