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
b4f5738a
Commit
b4f5738a
authored
28 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-03-13 09:18:12 by sof]
updated for use with 1.3
parent
b26d48dd
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ghc/utils/hstags/Makefile
+77
-0
77 additions, 0 deletions
ghc/utils/hstags/Makefile
ghc/utils/hstags/hstags.prl
+39
-48
39 additions, 48 deletions
ghc/utils/hstags/hstags.prl
with
116 additions
and
48 deletions
ghc/utils/hstags/Makefile
0 → 100644
+
77
−
0
View file @
b4f5738a
TOP
=
../..
include
$(TOP)/mk/boilerplate.mk
# No ways
WAYS
=
# Note: might be overridden from cmd-line (see install rule below)
INSTALLING
=
0
C_PROG
=
hstags-help
SCRIPT_PROG
=
hstags
SCRIPT_OBJS
=
hstags.prl
SCRIPT_SUBST_VARS
=
\
INSTALLING
\
TMPDIR
\
TOP_PWD
\
PROJECTVERSION
ifneq
"$(BIN_DIST)" "1"
SCRIPT_SUBST_VARS
+=
INSTLIBDIR_GHC
endif
#
# The hstags script is configured with different
# set of config variables, depending on whether it
# is to be installed or not.
#
ifeq
"$(INSTALLING)" "1"
TOP_PWD
:=
$(
prefix
)
ifeq
"$(BIN_DIST)" "1"
SCRIPT_PREFIX_FILES
+=
prefix.txt
else
INSTLIBDIR_GHC
=
$(
libdir
)
endif
else
TOP_PWD
:=
$(
FPTOOLS_TOP_ABS
)
INSTLIBDIR_GHC
=
$(
libdir
)
HSP_IMPORTS
:=
"
$(
TOP_PWD
)
/ghc/lib/ghc"
:
"
$(
TOP_PWD
)
/ghc/lib/required"
:
"
$(
TOP_PWD
)
/ghc/lib/glaExts"
:
"
$(
TOP_PWD
)
/ghc/lib/concurrent"
SCRIPT_SUBST_VARS
+=
HSP_IMPORTS
endif
#
# no INTERP: do *not* want #! script stuck on the front
#
# what's the deal? I'll add it for now (and perhaps pay for it later :-)
# -- SOF
INTERP
=
$(
PERL
)
#
# install setup
#
INSTALL_PROGS
=
$(
SCRIPT_PROG
)
INSTALL_LIBEXECS
=
$(
C_PROG
)
#
# Before really installing the script, we have to
# reconfigure it such that the paths it refers to,
# point to the installed utils.
#
install
::
@$(
RM
)
$(
SCRIPT_PROG
)
@$(
MAKE
)
$(
MFLAGS
)
INSTALLING
=
1
$(
SCRIPT_PROG
)
CLEAN_FILES
+=
$(
SCRIPT_PROG
)
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
)
BIN_DIST
=
0
$(
SCRIPT_PROG
)
This diff is collapsed.
Click to expand it.
ghc/utils/hstags/hstags.prl
+
39
−
48
View file @
b4f5738a
#
# To fully function, this script needs the following variables
# set:
#
# INSTALLING
# TMPDIR
# TOP_PWD
# INSTLIBDIR_GHC
# INSTDATADIR_GHC
# PROJECTVERSION
# HSP_IMPORTS
if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
$tmp = $ENV{'TMPDIR'} . "/$$.eht";
} else {
$tmp ="$
(
TMPDIR
)
/$$.eht";
$ENV{'TMPDIR'} =
'$(
TMPDIR
)'
; # set the env var as well
$tmp ="$
{
TMPDIR
}
/$$.eht";
$ENV{'TMPDIR'} =
${
TMPDIR
}
; # set the env var as well
}
#------------------------------------------------------------------------
# If you are adjusting paths by hand for a binary GHC distribution,
# de-commenting the line to set GLASGOW_HASKELL_ROOT should do.
# Or you can leave it as is, and set the environment variable externally.
#------------------------------------------------------------------------
# $ENV{'GLASGOW_HASKELL_ROOT'} = '/some/absolute/path/name';
if (! $ENV{'GLASGOW_HASKELL_ROOT'}) { # good -- death to environment variables
$TopPwd = '$(TOP_PWD)';
$InstLibDirGhc = '$(INSTLIBDIR_GHC)';
$InstDataDirGhc = '$(INSTDATADIR_GHC)';
} else {
$TopPwd = $ENV{'GLASGOW_HASKELL_ROOT'};
$TopPwd = "${TOP_PWD}";
$InstLibDirGhc = "${INSTLIBDIR_GHC}";
if ( '$(INSTLIBDIR_GHC)' =~ /\/local\/fp(\/.*)/ ) {
$InstLibDirGhc = $ENV{'GLASGOW_HASKELL_ROOT'} . $1;
} else {
print STDERR "GLASGOW_HASKELL_ROOT environment variable is set;\nBut can't untangle $(INSTLIBDIR_GHC).\n(Installation error)\n";
exit(1);
}
if ( '$(INSTDATADIR_GHC)' =~ /\/local\/fp(\/.*)/ ) {
$InstDataDirGhc = $ENV{'GLASGOW_HASKELL_ROOT'} . $1;
} else {
print STDERR "GLASGOW_HASKELL_ROOT environment variable is set;\nBut can't untangle $(INSTDATADIR_GHC).\n(Installation error)\n";
exit(1);
}
}
$Unlit = ( $(INSTALLING) ) ? "$InstLibDirGhc/unlit"
: "$TopPwd/$(CURRENT_DIR)/$(GHC_UNLIT)";
$HsCpp = # but this is re-set to "cat" (after options) if -cpp not seen
( $(INSTALLING) ) ? "$InstLibDirGhc/hscpp"
: "$TopPwd/$(CURRENT_DIR)/$(GHC_HSCPP)";
$HsP = ( $(INSTALLING) ) ? "$InstLibDirGhc/hsp"
: "$TopPwd/$(CURRENT_DIR)/$(GHC_HSP)";
$HsTagsHelp
= ( $(INSTALLING) ) ? "$InstLibDirGhc/hstags-help"
: "$TopPwd/$(CURRENT_DIR)/$(HSTAGSSRC)/hstags-help";
$Unlit = ( $INSTALLING ?
"${InstLibDirGhc}/unlit" :
"${TopPwd}/ghc/utils/unlit/unlit" );
# but this is re-set to "cat" (after options) if -cpp not seen
$HsCpp = ( $INSTALLING ?
"${InstLibDirGhc}/hscpp" :
"${TopPwd}/ghc/utils/hscpp/hscpp" );
$HsP = ( $INSTALLING ?
"${InstLibDirGhc}/hsp" :
"${TopPwd}/ghc/compiler/hsp" );
$HsTagsHelp =
( $INSTALLING ?
"${InstLibDirGhc}/hstags-help" :
"${TopPwd}/ghc/utils/hstags/hstags-help" );
$Verbose = 0;
$Append = '>';
...
...
@@ -57,7 +47,7 @@ while ($ARGV[0] =~ /^-./) {
/^--/ && last;
/^-v/ && ($Verbose = 1, next);
/^-a$/ && ($Append = '>>', next);
/^-fglasgow-ext/ && ($HsP_opts .= ' -N', next);
/^-fglasgow-ext
s
/ && ($HsP_opts .= ' -N', next);
/^-optP(.*)/ && ($Cpp_opts .= " $1", next);
/^-[UDI]/ && ($Cpp_opts .= " $_", next);
/^-cpp/ && ($DoCpp = 1, next);
...
...
@@ -65,13 +55,14 @@ while ($ARGV[0] =~ /^-./) {
push(@Files, $_);
}
$ghc_version_info =
$(
PROJECTVERSION
)
* 100;
$ghc_version_info =
int(${
PROJECTVERSION
}
* 100
)
;
$DoHsCpp = ( ! $DoCpp ) ? 'cat'
: "$HsCpp -D__HASKELL1__=2 -D__GLASGOW_HASKELL__=$ghc_version_info $Cpp_opts";
# to find Prelude.hi
$HsP_opts .= ( ( $(INSTALLING) ) ? " -J$InstDataDirGhc/imports"
: " -J$TopPwd/$(CURRENT_DIR)/$(GHC_LIBSRC)/prelude" );
$HsP_opts .= ( $INSTALLING ?
"-J${InstLibDirGhc}/imports" :
( '-J' . join(' -J',split(/:/,${HSP_IMPORTS})) ));
open(STDOUT, "$Append TAGS") || die "can't create TAGS";
...
...
@@ -93,10 +84,10 @@ foreach $f ( @ARGV ) {
$return_val = $?;
die "Fatal error $return_val\n" if $return_val != 0;
$stuff = `ls -l $tmp`;
@size = split(/[ \t]+/,$stuff
);
print STDOUT "\f\n$f,
",
$size
[3],"
\n";
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime, $ctime,$blksize,$blocks) = stat("$tmp"
);
print STDOUT "\f\n$f,$
{
size
}
\n";
print STDOUT `cat $tmp`;
}
...
...
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