Adriano,

<<It was me who added these sed usages to makefiles, to let build work 
after header files removal.

Some time later, I discovered gcc -MP:

-------------
This option instructs CPP to add a phony target for each dependency 
other than the main file, causing each to depend on nothing. These dummy 
rules work around errors make gives if you remove header files without 
updating the Makefile to match.
This is typical output:

           test.o: test.c test.h

           test.h:
-------------

AFAIR it does the needed thing. I'm just not sure since when this option 
is present.>>

Sed in itself is not a problem, unfortunately as Alex and I have just discovered
sed on linux v's sed on MacOSX are slightly different beasties.

Via Alex.

"-i switch differs from GNU syntax

Mac:
-i extension
             Edit files in-place, saving backups with the specified
extension.  If a zero-length extension
             is given, no backup will be saved.  It is not recommended
to give a zero-length extension when
             in-place editing files, as you risk corruption or partial
content in situations where disk
             space is exhausted, etc.

GNU:
-i[extension]
              edit files in place (makes backup if extension supplied)

Currently we have the following command line:
sed -i -e command1 -e command2 somefile.d

Looks like Mac's sed does the follwoing:
- treats first -e switch as extension;
- treats "command1" as single command (OK when missing -e switch on Mac)
- treats second -e switch as first file to be processed."

The commit now allows this work properly on the Mac.

Paul

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to