[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Versioned Symbols in Shared Libraries



On Wed, 19 Feb 2003, Brian May wrote:

> Hello,
>
> Can somebody please tell me why ugly hacks like the
> following are required?
>
> +Versions: $(OBJS)
> +       rm -f $@
> +       echo "DB3_2 {" > $@
> +       echo "  global:" >> $@
> +       nm $(OBJS) | grep " [Tt] " | cut -d" " -f3 | sed -e 's/$$/;/' >> $@
> +       echo "};" >> $@

Ew, bug, bad bad.

What happens if the 4th command(nm) fails?  make will think Versions is
uptodate.

Please, people, please, output to $@.new.  And, as the last final command, mv
$@.new $@.
</rant>



Reply to: