Build files: Unify standard arguments for assembler generating scrips
authorRichard Levitte <levitte@openssl.org>
Thu, 12 Sep 2019 21:58:07 +0000 (23:58 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 16 Sep 2019 14:29:57 +0000 (16:29 +0200)
commit593d5c2fadd3c1322fa995e9ac9ced3af4d6468d
tree923d5668965ea6e87226257dca540ab8481b8d8b
parent6ef03ea98fac501e6d6e33bac6ad3c92ea074712
Build files: Unify standard arguments for assembler generating scrips

- Make the last argument always be the output file.
- Make the first argument always be the flavour, even if there is no
  flavour (i.e. it might become the empty string).
- Make the next to last argument to be $(PROCESSOR) if that one has a
  value.
- Remaining arguments are C prepropressor arguments.

Perl scripts that should handle this may use the following code:

    $output = pop;
    $flavour = shift;
    if ($ARGV[$#ARGV] eq '386') {
        # Do 386 specific things
    } else {
        # Do whatever else, with the knowledge the @ARGV contains
        # C preprocessor arguments
    }

Some scripts don't care about anything than $output, and that's ok.
Some scripts do care, but handle it a little differently, and that's
ok too (notably, the x86 scripts call asm_init() with the first and
the last argument after having popped $output).
As long as they handle the argument order right, they are going to
be fine.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9884)
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl