3 # Silly GHC ./Setup helper, simply to strip the DESTDIR away
4 # when it is not passed in, and add "--copy-prefix" if it is.
10 my $setup = File
::Spec
->catfile(File
::Spec
->curdir, "Setup$Config{_exe}");
11 my @args = grep !/^--[-\w]*prefix=$/, @ARGV;
14 if ($args[0] eq 'copy') {
15 if (@args != @ARGV and is_root
()) {
16 # if there's no prefix, we want an install.
20 # If this is merely a copy, tell the user to "make register".
24 print "*** Running: $setup @args\n";
26 my $rv = system($setup, @args);
28 if ($prompt_register) {
30 *** Installed
! If you would like to make Pugs a
system-wide GHC
package
31 for use with other Haskell programs
, type
'$Config{make} register'.
36 *** Installed successfully
!
42 *** Installation failed
(exit code
$rv).
50 eval('$> == 0') || $@
; # System with no concepts of UIDs