Unified - adapt the generation of ripemd assembler to use GENERATE
authorRichard Levitte <levitte@openssl.org>
Mon, 7 Mar 2016 14:49:34 +0000 (15:49 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 9 Mar 2016 10:09:26 +0000 (11:09 +0100)
This gets rid of the BEGINRAW..ENDRAW sections in crypto/ripemd/build.info.

This also moves the assembler generating perl scripts to take the
output file name as last command line argument, where necessary.

Reviewed-by: Andy Polyakov <appro@openssl.org>
crypto/ripemd/Makefile.in
crypto/ripemd/asm/rmd-586.pl
crypto/ripemd/build.info

index 8158a7303a0f1a5f8c2c70ccf0e8a99a0446e9ce..ba77fe4f362e51bfff37fb6e0c44f2f98b3de84b 100644 (file)
@@ -40,7 +40,7 @@ lib:    $(LIBOBJ)
        @touch lib
 
 rmd-586.s:     asm/rmd-586.pl ../perlasm/x86asm.pl
-       $(PERL) asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) $@
+       $(PERL) asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) $@
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
index e8b2bc2db2dee356f8d69951ad4fba75281e2921..fd32a73606e5b477b6aaeeb9cbefa351cb8acb16 100644 (file)
@@ -9,6 +9,9 @@ $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
 push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 
+$output=pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],$0);
 
 $A="ecx";
@@ -60,6 +63,8 @@ $KR3=0x7A6D76E9;
 &ripemd160_block("ripemd160_block_asm_data_order");
 &asm_finish();
 
+close STDOUT;
+
 sub Xv
        {
        local($n)=@_;
index e39f9bd2236f14da6fb6d031b5ecf10c8995178c..f71f3139613e1a7aff736f232553159e4e69c244 100644 (file)
@@ -2,9 +2,5 @@ LIBS=../../libcrypto
 SOURCE[../../libcrypto]=\
         rmd_dgst.c rmd_one.c {- $target{rmd160_asm_src} -}
 
-BEGINRAW[Makefile]
-##### RMD160 assembler implementations
-
-{- $builddir -}/rmd-586.s:     {- $sourcedir -}/asm/rmd-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS) > $@
-ENDRAW[Makefile]
+GENERATE[rmd-586.s]=asm/rmd-586.pl $(PERLASM_SCHEME) $(CFLAGS)
+DEPEND[rmd-586.s]=../perlasm/x86asm.pl