$Usage = "usage: $Pgm: not done yet\n";
$Status = 0; # just used for exit() status
-$Verbose = '';
+$Verbose = 0;
$Dashdashes_seen = 0;
$Begin_magic_str = "# DO NOT DELETE: Beginning of C dependencies\n";
$Makefile = '';
@Src_files = ();
+# the following is a hack, so we can use RAWCPP, but there you go;
+# put in just enough #defines that mkdependC will not barf.
+$HostPlatform = '$(HOSTPLATFORM)';
+
+if ( $HostPlatform =~ /^i386-/ ) {
+ push(@Defines, '-D__i386__');
+}
+if ( $HostPlatform =~ /^sparc-/ ) {
+ push(@Defines, '-D__sparc__');
+}
+if ( $HostPlatform =~ /-solaris2$/ ) {
+ push(@Defines, '-D__svr4__');
+}
+
&mangle_command_line_args();
if ( ! $Makefile && -f 'makefile' ) {
$Makefile = 'makefile';
} elsif ( ! $Makefile && -f 'Makefile') {
$Makefile = 'Makefile';
-} else {
+} elsif ( ! $Makefile) {
die "$Pgm: no makefile or Makefile found\n";
}
}
close(NMKF);
close(OMKF);
-chmod 0444, 'Makefile';
exit 0;
sub mangle_command_line_args {
} elsif ($Dashdashes_seen != 1) { # not between -- ... --
if ( /^-v$/ ) {
- $Verbose = '-v';
+ $Verbose++;
} elsif ( /^-f/ ) {
$Makefile = &grab_arg_arg($_);
} elsif ( /^-o/ ) {