Unified - adapt the generation of blowfish assembler to use GENERATE
authorRichard Levitte <levitte@openssl.org>
Mon, 7 Mar 2016 14:13:01 +0000 (15:13 +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/bf/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/bf/Makefile.in
crypto/bf/asm/bf-586.pl
crypto/bf/build.info

index ee5c2599239c46dc7cf5bb06b8c92a55a51e9cbe..398844aaebf95bc0b7974e7e672664028a613248 100644 (file)
@@ -40,7 +40,7 @@ lib:  $(LIBOBJ)
        @touch lib
 
 bf-586.s:      asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
-       $(PERL) asm/bf-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/bf-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
index b74cfbafd4b05cc9f0d6e643a2df13ae836e92f7..319a63875497a155fc458289befa92645573b70c 100644 (file)
@@ -5,6 +5,9 @@ push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 require "cbc.pl";
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],"bf-586.pl",$ARGV[$#ARGV] eq "386");
 
 $BF_ROUNDS=16;
@@ -22,6 +25,8 @@ $tmp4="edx";
 &cbc("BF_cbc_encrypt","BF_encrypt","BF_decrypt",1,4,5,3,-1,-1);
 &asm_finish();
 
+close STDOUT;
+
 sub BF_encrypt
        {
        local($name,$enc)=@_;
index 7d208d209e6bde6408c13574e3d45609ea106f7d..466f1343cd0165594096724cdc60182dfa4b5f44 100644 (file)
@@ -1,9 +1,5 @@
 LIBS=../../libcrypto
 SOURCE[../../libcrypto]=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c 
 
-BEGINRAW[Makefile]
-##### BF assembler implementations
-
-{- $builddir -}/bf-586.s:      {- $sourcedir -}/asm/bf-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl {- $sourcetop -}/crypto/perlasm/cbc.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/bf-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-ENDRAW[Makefile]
+GENERATE[bf-586.s]=asm/bf-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[bf-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl