Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
2963660e
Commit
2963660e
authored
28 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-03-13 09:10:17 by sof]
make perl5 friendly plus new Makefile setup
parent
b7e04827
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ghc/utils/stat2resid/Makefile
+47
-8
47 additions, 8 deletions
ghc/utils/stat2resid/Makefile
ghc/utils/stat2resid/parse-gcstats.prl
+4
-3
4 additions, 3 deletions
ghc/utils/stat2resid/parse-gcstats.prl
ghc/utils/stat2resid/stat2resid.prl
+6
-6
6 additions, 6 deletions
ghc/utils/stat2resid/stat2resid.prl
with
57 additions
and
17 deletions
ghc/utils/stat2resid/Makefile
+
47
−
8
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
)
This diff is collapsed.
Click to expand it.
ghc/utils/stat2resid/parse-gcstats.prl
+
4
−
3
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
;
}
...
...
This diff is collapsed.
Click to expand it.
ghc/utils/stat2resid/stat2resid.prl
+
6
−
6
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";
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment