Use "copy" instead of "auto".
authorBen Laurie <ben@links.org>
Sat, 2 Mar 2013 04:44:36 +0000 (04:44 +0000)
committerBen Laurie <ben@links.org>
Mon, 4 Mar 2013 14:31:18 +0000 (14:31 +0000)
util/mk1mf.pl

index 5984498c30768584d264fcff98935c7c96549366..bb528f0c4b3e225375a9f61422bdc1842f43a57b 100755 (executable)
@@ -107,7 +107,8 @@ $infile="MINFO";
        "netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets",
        "netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets",
        "default","cc under unix",
        "netware-libc", "CodeWarrior for NetWare - LibC - with WinSock Sockets",
        "netware-libc-bsdsock", "CodeWarrior for NetWare - LibC - with BSD Sockets",
        "default","cc under unix",
-       "auto", "auto detect from top level Makefile"
+       "auto", "auto detect from top level Makefile",
+        "copy", "copy from top level Makefile"
        );
 
 $platform="";
        );
 
 $platform="";
@@ -196,7 +197,7 @@ $NT=0;
 
 push(@INC,"util/pl","pl");
 
 
 push(@INC,"util/pl","pl");
 
-if ($platform eq "auto") {
+if ($platform eq "auto" || $platform eq 'copy') {
        $orig_platform = $platform;
        $platform = $mf_platform;
        print STDERR "Imported platform $mf_platform\n";
        $orig_platform = $platform;
        $platform = $mf_platform;
        print STDERR "Imported platform $mf_platform\n";
@@ -323,8 +324,10 @@ else
 ##else
        { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
 ##else
        { $cflags="$c_flags$cflags" if ($c_flags ne ""); }
 
-$cflags = $mf_cflag if $orig_platform eq 'auto';
-$cc = $mf_cc if $orig_platform eq 'auto';
+if ($orig_platform eq 'copy') {
+    $cflags = $mf_cflag;
+    $cc = $mf_cc;
+}
 
 $ex_libs="$l_flags$ex_libs" if ($l_flags ne "");
 
 
 $ex_libs="$l_flags$ex_libs" if ($l_flags ne "");