Unify all assembler file generators
[openssl.git] / crypto / sha / asm / sha512-parisc.pl
index 66774e2fa154b21caf2c0f289bbafd5c79412770..f40642692878bd30126375138fe9e14f1e533387 100755 (executable)
 #
 # Special thanks to polarhome.com for providing HP-UX account.
 
-$flavour = shift;
-$output = shift;
-open STDOUT,">$output";
+# $output is the last argument if it looks like a file (it has an extension)
+# $flavour is the first argument if it doesn't look like a file
+$output = $#ARGV >= 0 && $ARGV[$#ARGV] =~ m|\.\w+$| ? pop : undef;
+$flavour = $#ARGV >= 0 && $ARGV[0] !~ m|\.| ? shift : undef;
+
+$output and open STDOUT,">$output";
 
 if ($flavour =~ /64/) {
        $LEVEL          ="2.0W";