Hello,

Actually, I think the most portable solution would be to use perl
because not all sed implementations have an in-place switch
(OpenBSD for example):

--- Makefile.in.orig    Fri Nov  4 20:20:53 2011
+++ Makefile.in Sat Dec 10 13:24:37 2011
@@ -215,10 +215,10 @@
 lib/Cilly.pm: lib/Cilly.pm.in src/machdep-ml.c configure.in Makefile.in
        cp lib/Cilly.pm.in lib/Cilly.pm
        if $(MACHDEPCC) -m32 src/machdep-ml.c -o $(OBJDIR)/machdep-ml32.exe 
;then \
-         sed -i -e "s|nogcc32model|`$(EMUL) $(OBJDIR)/machdep-ml32.exe 
--env`|" lib/Cilly.pm; \
+         perl -pi -e "s|nogcc32model|`$(EMUL) $(OBJDIR)/machdep-ml32.exe 
--env`|" lib/Cilly.pm; \
        fi
        if $(MACHDEPCC) -m64 src/machdep-ml.c -o $(OBJDIR)/machdep-ml64.exe 
;then \
-         sed -i -e "s|nogcc64model|`$(EMUL) $(OBJDIR)/machdep-ml64.exe 
--env`|" lib/Cilly.pm; \
+         perl -pi -e "s|nogcc64model|`$(EMUL) $(OBJDIR)/machdep-ml64.exe 
--env`|" lib/Cilly.pm; \
        fi
 
 # Create the version information module
@@ -411,7 +411,7 @@
 install: install-findlib
        $(INSTALL) -d $(DESTDIR)$(perl_vendorlib)
        $(INSTALL) -m 0644 lib/*.pm bin/CilConfig.pm $(DESTDIR)$(perl_vendorlib)
-       sed -i "s,^.*cilhome.*$$,\$$::cilhome = \"$(libexecdir)/cil\";," 
$(DESTDIR)$(perl_vendorlib)/CilConfig.pm
+       perl -pi -e "s,^.*cilhome.*$$,\\$$::cilhome = \"$(libexecdir)/cil\";," 
$(DESTDIR)$(perl_vendorlib)/CilConfig.pm
        $(INSTALL) -d $(DESTDIR)$(bindir)
        $(INSTALL) -m 0755 bin/cilly $(DESTDIR)$(bindir)
        $(INSTALL) -d $(DESTDIR)$(pkglibexecdir)/$(OBJDIR)

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to