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

index 06f65e21aa423e5d54356d509086e8c828bc6118..c43eecb5e54a51fd5dfa2dace1c51e65876218ec 100644 (file)
@@ -40,7 +40,7 @@ lib:  $(LIBOBJ)
        @touch lib
 
 cast-586.s:    asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
-       $(PERL) asm/cast-586.pl $(PERLASM_SCHEME) $(CLAGS) $(PROCESSOR) $@
+       $(PERL) asm/cast-586.pl $(PERLASM_SCHEME) $(CLAGS) $(PROCESSOR) $@
 
 files:
        $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
index ec2eab179d536d2cf3c5b8417377201340393de6..267d69976d2c0e5441a9c0f43ce7ffa45438cc04 100644 (file)
@@ -11,6 +11,9 @@ push(@INC,"${dir}","${dir}../../perlasm");
 require "x86asm.pl";
 require "cbc.pl";
 
+$output=pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],"cast-586.pl",$ARGV[$#ARGV] eq "386");
 
 $CAST_ROUNDS=16;
@@ -36,6 +39,8 @@ $S4="CAST_S_table3";
 
 &asm_finish();
 
+close STDOUT;
+
 sub CAST_encrypt {
     local($name,$enc)=@_;
 
index 84c100e1d3198fc1d090da0cff669bdd6d43ba9f..20b6f6c9f4a2eabbabf190c287d649732e3aa7f7 100644 (file)
@@ -2,9 +2,5 @@ LIBS=../../libcrypto
 SOURCE[../../libcrypto]=\
         c_skey.c c_ecb.c {- $target{cast_asm_src} -} c_cfb64.c c_ofb64.c
 
-BEGINRAW[Makefile]
-##### CAST assembler implementations
-
-{- $builddir -}/cast-586.s:    {- $sourcedir -}/asm/cast-586.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl {- $sourcetop -}/crypto/perlasm/cbc.pl
-       CC="$(CC)" $(PERL)      {- $sourcedir -}/asm/cast-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-ENDRAW[Makefile]
+GENERATE[cast-586.s]=asm/cast-586.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[cast-586.s]=../perlasm/x86asm.pl ../perlasm/cbc.pl