autotools: better fix for rewriting content of src/Makefile

This commit is contained in:
Cedric BAIL 2014-04-02 10:31:34 +09:00
parent 4053911ef3
commit 2c4ae3fe6f
1 changed files with 5 additions and 2 deletions

View File

@ -4188,9 +4188,12 @@ AC_OUTPUT
#### Work around bug in automake check macro
## yes it is hugly, but no choice here for now.
sed -i "s/am__is_gnu_make = test -n '\$(MAKEFILE_LIST)' && test -n '\$(MAKELEVEL)'/ifdef MAKEFILE_LIST\nifdef MAKELEVEL\nam__is_gnu_make = true\nelse\nam__is_gnu_make = false\nendif\nelse\nam__is_gnu_make = false\nendif/" src/Makefile
$SED -i "s/am__is_gnu_make = test -n '\$(MAKEFILE_LIST)' && test -n '\$(MAKELEVEL)'/ifdef MAKEFILE_LIST\nifdef MAKELEVEL\nam__is_gnu_make = true\nelse\nam__is_gnu_make = false\nendif\nelse\nam__is_gnu_make = false\nendif/" src/Makefile
if test -f $srcdir/config.status; then
TO="$SED -i \"s/am__is_gnu_make = test -n '\\\\\$(MAKEFILE_LIST)' \&\& test -n '\\\\\$(MAKELEVEL)'/ifdef MAKEFILE_LIST\\\nifdef MAKELEVEL\\\nam__is_gnu_make = true\\\nelse\\\nam__is_gnu_make = false\\\nendif\\\nelse\\\nam__is_gnu_make = false\\\nendif/\" src/Makefile\nas_fn_exit 0"
$SED -i "s|as_fn_exit 0|$TO|" $srcdir/config.status
fi
#### Info