From 3dc9c14b343e27b17e149dd6c474d613c337bbd9 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Fri, 10 Mar 2006 00:33:30 +0000 Subject: [PATCH] mdw-setup: Fix for constructing Makefile.am from m4 source. Change into the containing directory before running m4. The Makefile machinery may want to use some other files lying around to do its thing, and it makes life easier if it doesn't have to do stupid games with relative-to-the-project-root file names. --- mdw-setup | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mdw-setup b/mdw-setup index d18a49a..276b6da 100755 --- a/mdw-setup +++ b/mdw-setup @@ -44,9 +44,10 @@ done if [ "$configure" ]; then grep >/dev/null AM_PROG_LIBTOOL $configure && libtoolize find . -name Makefile.m4 -print | while read m4; do - am=$(echo $m4 | sed 's:.m4:.am:') - m4 $m4 >$am.new - mv $am.new $am + dir=$(echo $m4 | sed 's:/[^/]*$::') + (cd $dir && + m4 Makefile.m4 >Makefile.am.new && + mv Makefile.am.new Makefile.am) done mkaclocal autoconf -- 2.11.0