diff options
author | Niels Möller <nisse@lysator.liu.se> | 2013-02-06 10:47:53 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2013-02-06 10:47:53 +0100 |
commit | 76182f607b79464f4a1525c813665c699c122d8d (patch) | |
tree | a0579db04fb75e3903ebc5dabc83da28890cc479 /configure.ac | |
parent | 26cdf2af1984abefe15d9828fa5a18c190964366 (diff) | |
download | nettle-76182f607b79464f4a1525c813665c699c122d8d.tar.gz |
Use a separate make rule for m4 preprocessing of assembly files.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e851ad0c..c6214bae 100644 --- a/configure.ac +++ b/configure.ac @@ -235,11 +235,11 @@ if test "x$enable_assembler" = xyes ; then esac fi # echo "enable_assembler: $enable_assembler, asm_path: $asm_path" +asm_file_list="" if test "x$enable_assembler" = xyes ; then if test -n "$asm_path"; then AC_MSG_NOTICE([Looking for assembler files in $asm_path/.]) - found=no for tmp_f in aes-encrypt-internal.asm aes-decrypt-internal.asm \ arcfour-crypt.asm camellia-crypt-internal.asm \ md5-compress.asm memxor.asm \ @@ -249,17 +249,33 @@ if test "x$enable_assembler" = xyes ; then # echo "Looking for $srcdir/$asm_path/$tmp_f" if test -f "$srcdir/$asm_path/$tmp_f"; then # echo found - found=yes + asm_file_list="$asm_file_list $tmp_f" AC_CONFIG_LINKS($tmp_f:$asm_path/$tmp_f) fi done - if test "$found" = no; then + if test -z "$asm_file_list"; then enable_assembler=no AC_MSG_WARN([No assembler files found.]) fi fi fi +# Besides getting correct dependencies, the explicit rules also tell +# make that the .s files "ought to exist", so they are preferred over +# .c files. +AC_CONFIG_COMMANDS([asm.d], + [ for f in $asm_file_list + do + case $f in + *.asm) + echo "`basename $f .asm`.s : $f "'$(srcdir)/asm.m4 machine.m4 config.m4' + ;; + esac + done > asm.d + ], + [ asm_file_list="$asm_file_list" ] +) + LSH_CCPIC SHLIBCFLAGS="$CCPIC" |