[vlc-devel] [PATCH] bootstrap: run genmf in a subshell

Francois Cartegnie fcartegnie at free.fr
Thu Jan 21 20:39:23 CET 2010


Le Thursday 21 January 2010, Rémi Denis-Courmont a écrit :
> sh is the POSIX shell. If there is a non-POSIX construct in genmf, it
>  should be fixed. I still fail to see anything wrong with the current
>  bootstrap.
> -bash-3.00$ git checkout bootstrap

sh is just a name, no guarantee that /bin/sh is the good posix shell :/

-bash-3.00$ /usr/xpg4/bin/sh ./bootstrap 
+ dirname ./bootstrap
...
+ autopoint --dry-run --force
+ 1> /dev/null 2>& 1
generating modules/**/Makefile.am
modules/genmf: syntax error at line 9: `(' unexpected

-bash-3.00$ /usr/xpg4/bin/sh modules/genmf `sed -ne 
's,modules/\(.*\)/Makefile,\1,p' configure.ac`
............................................................................
-bash-3.00$ /bin/sh modules/genmf `sed -ne 's,modules/\(.*\)/Makefile,\1,p' 
configure.ac`modules/genmf: syntax error at line 10: `(' unexpected

If you intend to run genmk apart, the only easy way i see to fix this is to 
allow overriding the shell with a custom variable like autoconf does.
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
$CONFIG_SHELL modules/genmf `sed -ne 's,modules/\(.*\)/Makefile,\1,p'

Francois



More information about the vlc-devel mailing list