[patch] Extract version number from version.in

Ian Lance Taylor ian@zembu.com
Fri Jun 8 09:18:00 GMT 2001


Andrew Cagney <ac131313@cygnus.com> writes:

> --- 1759,1771 ----
>   # as VER="$(VER)"
>   VER = `	if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
>   	  sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
> ! 	else if test -f $(TOOL)/version.in; then \
> ! 	  head -1 $(TOOL)/version.in; \
> ! 	else if grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
>   	  sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
> ! 	else \
> ! 	  echo VERSION; \
> ! 	fi fi fi`
>   PACKAGE = $(TOOL)
>   
>   .PHONY: taz

All shells support `elif', which can be used instead of `else if'.

Ian



More information about the Binutils mailing list