summaryrefslogtreecommitdiffstats
path: root/lang/ghc6/files/patch-ab
blob: 20f3a9be98ae7d42b9dd179c90e052660a1aee17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
*** mk/config.mk.in~       Thu Jun  1 12:02:31 2000
--- mk/config.mk.in        Sat Sep  2 16:35:34 2000
***************
*** 365,371 ****
  # this in build.mk or set your environment variable "TMPDIR" to point
  # to somewhere with more space.  (TMPDIR=. is a good choice).
  
! TMPDIR			= /tmp
  
  # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.
  
--- 365,371 ----
  # this in build.mk or set your environment variable "TMPDIR" to point
  # to somewhere with more space.  (TMPDIR=. is a good choice).

! GHC_TMPDIR            = /tmp

  # FPTOOLS_TOP: the top of the fptools hierarchy, absolute path.

*** ghc/driver/Makefile~   Thu Apr 27 12:04:37 2000
--- ghc/driver/Makefile    Sat Sep  2 16:35:43 2000
***************
*** 65,71 ****
  ifeq "$(BIN_DIST)" "1"
  SCRIPT_PREFIX_FILES=prefix.txt
  else
! SCRIPT_SUBST_VARS += libdir includedir libexecdir datadir bindir TMPDIR TOP_PWD
  endif

  all :: $(DYN_LOADABLE_BITS)
--- 65,71 ----
  ifeq "$(BIN_DIST)" "1"
  SCRIPT_PREFIX_FILES=prefix.txt
  else
! SCRIPT_SUBST_VARS += libdir includedir libexecdir datadir bindir GHC_TMPDIR TOP_PWD
  endif

  all :: $(DYN_LOADABLE_BITS)
*** ghc/driver/ghc.lprl~	Wed Aug  9 14:55:39 2000
--- ghc/driver/ghc.lprl		Sat Sep  2 16:56:16 2000
***************
*** 108,114 ****
  
  bindir libdir libexecdir datadir
  
! CURRENT_DIR TMPDIR
  
  GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR
  
--- 108,114 ----
  
  bindir libdir libexecdir datadir
  
! CURRENT_DIR GHC_TMPDIR
  
  GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR
  
***************
*** 157,177 ****
  @INC = ( ( $INSTALLING ) ? $InstLibDirGhc
  			   : "$TopPwd/${CURRENT_DIR}" );
  
! $ENV{'TMPDIR'} = $TMPDIR if $TargetPlatform =~ /^.*(cygwin32|mingw32)$/;
! if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
!     # Try to find a $Tmp_prefix which isn't being used...
!     $tmp = $$;
!     do {
!       $Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$tmp");
!       $tmp++;
!     } while ( -e "$Tmp_prefix.hc" ||
! 	      -e "$Tmp_Prefix.s"  || 
! 	      -e "$Tmp_Prefix.hi" );
! } else {
!     print STDERR "TMPDIR has not been set to anything useful!\n" if (${TMPDIR} eq '');
!     $Tmp_prefix ="${TMPDIR}/ghc$$"; # TMPDIR set via Makefile when booting..
!     $ENV{'TMPDIR'} = ${TMPDIR}; # set the env var as well
  }
  
  # Some shells run into real trouble when command line and environment
  # gets big (e.g., cmd lines of >4K to /bin/sh causes havoc on our 
--- 157,177 ----
  @INC = ( ( $INSTALLING ) ? $InstLibDirGhc
  			   : "$TopPwd/${CURRENT_DIR}" );
  
! $ENV{'TMPDIR'} = ${GHC_TMPDIR} if $TargetPlatform =~ /^.*(cygwin32|mingw32)$/;
! if ( ! $ENV{'TMPDIR'} ) {
!     print STDERR "TMPDIR has not been set to anything useful!\n" if (${GHC_TMPDIR} eq '');
!     $ENV{'TMPDIR'} = ${GHC_TMPDIR}; # set the env var as well
  }
+ # Try to find a $Tmp_prefix which isn't being used...
+ $tmp = $$;
+ do {
+     $Tmp_prefix = ($ENV{'TMPDIR'} . "/ghc$tmp");
+     $tmp++;
+ } while ( -e "$Tmp_prefix.hc" ||
+         -e "$Tmp_Prefix.s"  ||
+         -e "$Tmp_Prefix.hi" );
  
  # Some shells run into real trouble when command line and environment
  # gets big (e.g., cmd lines of >4K to /bin/sh causes havoc on our 
OpenPOWER on IntegriCloud