Revision 2c2f67bd

View differences:

configure.in
114 114
fi
115 115

  
116 116
AC_CONFIG_HEADER(sysdep/autoconf.h)
117
AC_OUTPUT_COMMANDS(,[$srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
117
AC_OUTPUT_COMMANDS(,[CPP="$CPP" $srcdir/tools/mergedirs $srcdir $srcdir_rel $objdir $sysdep_dirs])
118 118
AC_OUTPUT($makefiles)
119 119

  
120 120
cat >&AC_FD_MSG <<EOF
tools/mergedirs
4 4
	echo "Usage: mergedirs <src-dir> <src-dir-rel> <obj-dir> <list-of-dirs>"
5 5
	exit 1
6 6
	fi
7
cpp=${CPP:-gcc -E}
7 8
SRCDIR=$1
8 9
shift
9 10
SRCREL=$1
......
19 20

  
20 21
echo "Merging system-dependent modules ($@)"
21 22
MODULES=`for a in $@ ; do
22
		sed <$SRCDIR/$a/Modules "s@\\(.*\\)@\\1 $a/\\1@"
23
		cat sysdep/autoconf.h $SRCDIR/$a/Modules |
24
		$cpp -U unix - |
25
		sed "/^[ ]*\$/d;/^#/d;s@\\(.*\\)@\\1 $a/\\1@"
23 26
		done |
24 27
	sort +0 -1 -u |
25 28
	cut -d ' ' -f 2`

Also available in: Unified diff