GNOME Bugzilla – Bug 87835
idl include checks require gnu sed?
Last modified: 2004-12-22 21:47:04 UTC
i've seen this happen on solaris and os x: the sed command that generates the orbit-idl include line does not work, and you just get the two paths w/o the -I: jacob@localhost:nautilus$ grep IDL_INCLUDES config.status s,@LIBNAUTILUS_IDL_INCLUDES@, /gnome2/share/idl/bonobo-activation-2.0 /gnome2/share/idl/bonobo-2.0,;t t s,@CORE_IDL_INCLUDES@, /gnome2/share/idl/bonobo-activation-2.0 /gnome2/share/idl/bonobo-2.0,;t t i don't know enough about sed to know how to fix this, however... i'd rather see orbit-idl use something more like cflags rather than this weird thing, but that's just me. the workaround i've been using is to hand-edit config.status...
this seems to fix it (to add-include-prefix): -sed -e 's/^/ /' -e 's/ \+$//' -e 's/ \+/ -I /g' -e 's/^ \+//' +sed -e 's/^/ /' -e 's/ *$//' -e 's/ */ -I /g' -e 's/^ *//'
The same problem arises in NetBSD. The following change fixes it: -sed -e 's/^/ /' -e 's/ \+$//' -e 's/ \+/ -I /g' -e 's/^ \+//' +sed -e 's/ +/ /g' -e 's/^/ /' -e 's/ / -I /g' -e 's/ -I $//' That is, suppress all contiguous spaces, then add one at the very beginning, substitute spaces with -I and at last remove any -I that may have been appened at the end.
Is this ok?
If this problem still exists then I suggest someone ubmits a real patch.
Created attachment 19937 [details] [review] patch sed syntax
This is a real patch. It works with both traditional sed (checked on MacOS X 10.2.6) and GNU sed (version 4.0.5). This is still an issue as of 2.4.0
Adding keyword and pri because of patch.
The + operator doesn't work in osx sed, so this patch is broken. Instead i checked in: -sed -e 's/^/ /' -e 's/ \+$//' -e 's/ \+/ -I /g' -e 's/^ \+//' +sed -e 's/^/ /' -e 's/ */ /g' -e 's/ / -I /g' -e 's/ -I $//' which should work.