Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
2963660e
Commit
2963660e
authored
Mar 13, 1997
by
sof
Browse files
[project @ 1997-03-13 09:10:17 by sof]
make perl5 friendly plus new Makefile setup
parent
b7e04827
Changes
3
Hide whitespace changes
Inline
Side-by-side
ghc/utils/stat2resid/Makefile
View file @
2963660e
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.
2
199
6/11/21 16:49:10 simonm
Exp $
# $Id: Makefile,v 1.
3
199
7/03/13 09:10:17 sof
Exp $
TOP
=
../..
/..
include
$(TOP)/
ghc/mk/ghc
.mk
TOP
=
../..
include
$(TOP)/
mk/boilerplate
.mk
DYN_LOADABLE_BITS
=
\
parse-gcstats.prl
\
process-gcstats.prl
PROG
=
stat2resid
SRC
=
stat2resid.prl
SCRIPT_PROG
=
stat2resid
SCRIPT_OBJS
=
stat2resid.prl
#
# Could be overridden from the cmd line (see install rule below).
#
INSTALLING
=
0
SCRIPT_SUBST_VARS
=
TMPDIR SCRIPT_PATH
INTERP
=
$(PERL)
DESTDIR
=
$(INSTBINDIR_GHC)
CLEAN_FILES
+=
$(SCRIPT_PROG)
#
# The stat2resid script is configured with a different
# path to the supporting perl scripts, depending on whether it
# is to be installed or not.
#
ifeq
"$(INSTALLING)" "1"
SCRIPT_PATH
:=
$(libdir)
else
SCRIPT_PATH
:=
$(FPTOOLS_TOP_ABS)
/ghc/utils/stat2resid
endif
#
# install setup
#
INSTALL_LIBS
+=
$(DYN_LOADABLE_BITS)
INSTALL_PROGS
+=
$(SCRIPT_PROG)
#
# Before really installing the script, we have to
# reconfigure it such that the paths it refers to,
# point to the installed utils.
#
install
::
$(INSTALL)
$(INSTDATAFLAGS)
$(DYN_LOADABLE_BITS)
$(INSTLIBDIR_GHC)
$(RM)
$(SCRIPT_PROG)
$(MAKE)
$(MFLAGS)
INSTALLING
=
1
$(SCRIPT_PROG)
include
$(TOP)/mk/script.mk
include
$(TOP)/mk/target.mk
# Hack to re-create the in-situ build tree script after
# having just installed it.
#
install
::
@
$(RM)
$(SCRIPT_PROG)
@
$(MAKE)
$(MFLAGS)
$(SCRIPT_PROG)
ghc/utils/stat2resid/parse-gcstats.prl
View file @
2963660e
...
...
@@ -36,9 +36,10 @@ sub parse_stats {
local
(
$statsfile
,
$line
,
$row
,
$col
,
$val
);
local
(
@stats
,
@hdr1
,
@hdr2
,
@line_vals
);
local
(
%the_stats
);
local
(
*STATS
);
open
(
$statsfile
,
$filename
)
||
die
"
Cant open
$filename
\n
";
@stats
=
<
$statsfile
>
;
open
(
STATS
,
$filename
)
||
die
"
Cant open
$filename
\n
";
@stats
=
<
STATS
>
;
do
{
$line
=
shift
(
@stats
);}
until
(
$line
!~
/^$/
);
chop
(
$line
);
...
...
@@ -181,7 +182,7 @@ arg: while($_ = $stats[0]) {
print
STDERR
"
Unmatched line:
$_
";
}
close
(
$statsfile
);
close
(
STATS
);
%the_stats
;
}
...
...
ghc/utils/stat2resid/stat2resid.prl
View file @
2963660e
#
# (c) The GRASP/AQUA Project, Glasgow University, 1992-1996
#
# *** MSUB does some substitutions here ***
# *** grep for $( ***
# Perl script expect bindings for the following variables to be prepended
#
# TMPDIR SCRIPT_PATH
#
$debug = 0;
...
...
@@ -11,12 +12,11 @@ $outsuffix = ".resid.ps"; # change as appropriate
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$tmpfile = $ENV{'TMPDIR'} . "/$$.resid.data";
} else {
$tmpfile ="$
(
TMPDIR
)
/$$.resid.data";
$ENV{'TMPDIR'} =
'$(
TMPDIR
)'
; # set the env var as well
$tmpfile ="$
{
TMPDIR
}
/$$.resid.data";
$ENV{'TMPDIR'} =
${
TMPDIR
}
; # set the env var as well
}
@INC = ( ( $(INSTALLING) ) ? '$(INSTLIBDIR_GHC)'
: '$(TOP_PWD)/$(CURRENT_DIR)' );
@INC = ( ${SCRIPT_PATH} );
require('parse-gcstats.prl') || die "Can't load parse-gcstats.prl!\n";
require('process-gcstats.prl') || die "Can't load process-gcstats.prl!\n";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment