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

index e32a73be64abb8ee98be52ce19f39dcb63fa04c8..e8091524905a7a4f161a724ee82ac35e61e9e2a9 100644 (file)
@@ -42,9 +42,9 @@ lib:  $(LIBOBJ)
        @touch lib
 
 cmll-x86.s:    asm/cmll-x86.pl ../perlasm/x86asm.pl
-       $(PERL) asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
+       $(PERL) asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) $@
 cmll-x86_64.s:  asm/cmll-x86_64.pl
-       $(PERL) asm/cmll-x86_64.pl $(PERLASM_SCHEME) $@
+       $(PERL) asm/cmll-x86_64.pl $(PERLASM_SCHEME) $@
 cmllt4-sparcv9.S: asm/cmllt4-sparcv9.pl ../perlasm/sparcv9_modes.pl
        $(PERL) asm/cmllt4-sparcv9.pl $(PERLASM_SCHEME) $@
 
index 027302ac869817bcb81f2007aa8a3b975bff5c7b..de354aa2e54410b3f4f5a6ba66a8242c2637a075 100644 (file)
@@ -42,6 +42,9 @@ require "x86asm.pl";
 
 $OPENSSL=1;
 
+$output = pop;
+open STDOUT,">$output";
+
 &asm_init($ARGV[0],"cmll-586.pl",$ARGV[$#ARGV] eq "386");
 
 @T=("eax","ebx","ecx","edx");
@@ -1136,3 +1139,5 @@ my ($s0,$s1,$s2,$s3) = @T;
 &asciz("Camellia for x86 by <appro\@openssl.org>");
 
 &asm_finish();
+
+close STDOUT;
index b5c1114bace459cdf503eadc22eb66f7e816433d..6f50b24186fe17f8b435c0f1ea66728325c54386 100644 (file)
@@ -3,11 +3,8 @@ SOURCE[../../libcrypto]=\
         cmll_ecb.c cmll_ofb.c cmll_cfb.c cmll_ctr.c \
         {- $target{cmll_asm_src} -}
 
-BEGINRAW[Makefile]
-{- $builddir -}/cmll-x86.s:    {- $sourcedir -}/asm/cmll-x86.pl {- $sourcetop -}/crypto/perlasm/x86asm.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@
-{- $builddir -}/cmll-x86_64.s:  {- $sourcedir -}/asm/cmll-x86_64.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/cmll-x86_64.pl $(PERLASM_SCHEME) > $@
-{- $builddir -}/cmllt4-sparcv9.S: {- $sourcedir -}/asm/cmllt4-sparcv9.pl {- $sourcetop -}/crypto/perlasm/sparcv9_modes.pl
-       CC="$(CC)" $(PERL) {- $sourcedir -}/asm/cmllt4-sparcv9.pl $(PERLASM_SCHEME) $@
-ENDRAW[Makefile]
+GENERATE[cmll-x86.s]=asm/cmll-x86.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR)
+DEPEND[cmll-x86.s]=../perlasm/x86asm.pl
+GENERATE[cmll-x86_64.s]=asm/cmll-x86_64.pl $(PERLASM_SCHEME)
+GENERATE[cmllt4-sparcv9.S]=asm/cmllt4-sparcv9.pl $(PERLASM_SCHEME)
+DEPEND[cmllt4-sparcv9.S]=../perlasm/sparcv9-modes.pl