VirtualBox

Ignore:
Timestamp:
Sep 15, 2006 5:09:38 AM (18 years ago)
Author:
bird
Message:

Untested merge with GNU Make v3.81 (vendor/gnumake/2005-05-16 -> vendor/gnumake/current).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmake/tests/run_make_tests.pl

    • Property svn:executable set to *
    r281 r503  
    1212#                        (and others)
    1313
     14# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
     15# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
     16# This file is part of GNU Make.
     17#
     18# GNU Make is free software; you can redistribute it and/or modify it under the
     19# terms of the GNU General Public License as published by the Free Software
     20# Foundation; either version 2, or (at your option) any later version.
     21#
     22# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
     23# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     24# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     25#
     26# You should have received a copy of the GNU General Public License along with
     27# GNU Make; see the file COPYING.  If not, write to the Free Software
     28# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
     29
    1430$valgrind = 0;              # invoke make with valgrind
     31$valgrind_args = '--num-callers=15 --tool=memcheck --leak-check=full';
    1532$pure_log = undef;
    1633
    1734require "test_driver.pl";
     35
     36# Some target systems might not have the POSIX module...
     37$has_POSIX = eval { require "POSIX.pm" };
    1838
    1939#$SIG{INT} = sub { print STDERR "Caught a signal!\n"; die @_; };
     
    181201
    182202sub get_this_pwd {
    183   if ($vos) {
    184     $delete_command = "delete_file";
     203  $delete_command = 'rm -f';
     204  if ($has_POSIX) {
     205    $__pwd = POSIX::getcwd();
     206  } elsif ($vos) {
     207    $delete_command = "delete_file -no_ask";
    185208    $__pwd = `++(current_dir)`;
    186   }
    187   else {
    188     $delete_command = "rm";
     209  } else {
     210    # No idea... just try using pwd as a last resort.
    189211    chop ($__pwd = `pwd`);
    190212  }
     
    217239   # This is probably not specific enough.
    218240   #
    219    if ($osname =~ /Windows/i || $osname =~ /MINGW32/i) {
     241   if ($osname =~ /Windows/i || $osname =~ /MINGW32/i || $osname =~ /CYGWIN_NT/i) {
    220242     $port_type = 'W32';
    221243   }
     
    249271   # Find the full pathname of Make.  For DOS systems this is more
    250272   # complicated, so we ask make itself.
    251    $make_path = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`;
    252    chop $make_path;
     273   my $mk = `sh -c 'echo "all:;\@echo \\\$(MAKE)" | $make_path -f-'`;
     274   chop $mk;
     275   $mk or die "FATAL ERROR: Cannot determine the value of \$(MAKE):\n
     276'echo \"all:;\@echo \\\$(MAKE)\" | $make_path -f-' failed!\n";
     277   $make_path = $mk;
    253278   print "Make\t= `$make_path'\n" if $debug;
    254279
     
    304329
    305330   if ($valgrind) {
    306 #     use POSIX qw(:fcntl_h);
    307 #     require Fcntl;
    308331     open(VALGRIND, "> valgrind.out")
    309332       || die "Cannot open valgrind.out: $!\n";
    310333     #  -q --leak-check=yes
    311      $make_path = "valgrind --num-callers=15 --logfile-fd=".fileno(VALGRIND)." $make_path";
     334     exists $ENV{VALGRIND_ARGS} and $valgrind_args = $ENV{VALGRIND_ARGS};
     335     $make_path = "valgrind --log-fd=".fileno(VALGRIND)." $valgrind_args $make_path";
    312336     # F_SETFD is 2
    313337     fcntl(VALGRIND, 2, 0) or die "fcntl(setfd) failed: $!\n";
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette