summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2010-02-20 23:59:09 +0000
committerIan Lynagh <igloo@earth.li>2010-02-20 23:59:09 +0000
commita4c75d1d6c00a3ae71dd1f8b6b49c96dac641ee3 (patch)
tree01e368f2c17288c36bd01ba9f74e5ff4588139e7 /utils
parentb112884301b68d043b96afd3c66babfe23b706ec (diff)
downloadhaskell-a4c75d1d6c00a3ae71dd1f8b6b49c96dac641ee3.tar.gz
Remove the old hstags util
Diffstat (limited to 'utils')
-rw-r--r--utils/hstags/Makefile64
-rw-r--r--utils/hstags/README10
-rw-r--r--utils/hstags/hstags-help.c59
-rw-r--r--utils/hstags/hstags.prl94
-rw-r--r--utils/hstags/prefix.txt9
5 files changed, 0 insertions, 236 deletions
diff --git a/utils/hstags/Makefile b/utils/hstags/Makefile
deleted file mode 100644
index f1ce8e1320..0000000000
--- a/utils/hstags/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/version.mk
-
-# Note: might be overridden from cmd-line (see install rule below)
-INSTALLING=0
-
-C_PROG=hstags-help
-SRC_CC_OPTS += -O
-
-SCRIPT_PROG=hstags
-SCRIPT_OBJS=hstags.prl
-
-SCRIPT_SUBST_VARS=\
- INSTALLING \
- TOP_PWD \
- ProjectVersionInt
-
-#
-# 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)
-SCRIPT_PREFIX_FILES += prefix.txt
-else
-TOP_PWD := $(FPTOOLS_TOP_ABS)
-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_SCRIPTS+=$(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)
-
-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)
-
diff --git a/utils/hstags/README b/utils/hstags/README
deleted file mode 100644
index b457ef125a..0000000000
--- a/utils/hstags/README
+++ /dev/null
@@ -1,10 +0,0 @@
-"hstags" is a relatively sophisticated program to produce Emacs TAGS
-files for Glasgow-Haskell-compilable programs. (It is "sophisticated"
-only in that it uses the GHC parser to find "interesting" things in
-the source files.)
-
-With GHC 2.01: doesn't work yet.
-
-A simpler alternative is Denis Howe's "fptags" script, which is
-distributed in the ghc/CONTRIB directory.
-
diff --git a/utils/hstags/hstags-help.c b/utils/hstags/hstags-help.c
deleted file mode 100644
index 92604876ff..0000000000
--- a/utils/hstags/hstags-help.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-#include <string.h> /* for strlen */
-
-/* typedef enum { False, True } Boolean; */
-
-#define SKIP /* Algol-68 lives */
-
-main(argc,argv)
-int argc;
-char **argv;
-{
- unsigned line;
- FILE *srcf;
- int thisline = 0, lastline = 0, linestart = 0;
- char linebuff[1024];
-
- if(argc < 2)
- {
- fprintf(stderr,"usage: %s sourcefile",argv[0]);
- exit(1);
- }
-
- if((srcf=fopen(argv[1],"r")) == NULL)
- {
- fprintf(stderr,"can't read %s\n",argv[1]);
- exit(2);
- }
-
- *linebuff = '\0';
-
- while(scanf("%u",&line)!=EOF)
- {
- if(line != lastline)
- {
- while(thisline < line && !feof(srcf))
- {
- linestart+=strlen(linebuff);
- fgets(linebuff,1023,srcf);
- thisline++;
- }
-
- if(thisline >= line)
- {
- char *chpos;
- for(chpos = linebuff; *chpos != '=' && *chpos != '\n' && *chpos != '\0'; ++chpos)
- putchar(*chpos);
-
- if(*chpos == '=')
- putchar('=');
-
- printf("%c%d,%d\n",0177,line,linestart);
- }
- lastline = line;
- }
- }
-
- fclose(srcf);
- exit(0);
-}
diff --git a/utils/hstags/hstags.prl b/utils/hstags/hstags.prl
deleted file mode 100644
index 16e770bd8a..0000000000
--- a/utils/hstags/hstags.prl
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# To fully function, this script needs the following variables
-# set:
-#
-# INSTALLING
-# DEFAULT_TMPDIR
-# TOP_PWD
-# libdir
-# libexecdir
-# ProjectVersionInt
-# HSP_IMPORTS
-
-if ( $ENV{'TMPDIR'} ) { # where to make tmp file names
- $tmp = $ENV{'TMPDIR'} . "/$$.eht";
-} else {
- $tmp ="${DEFAULT_TMPDIR}/$$.eht";
- $ENV{'TMPDIR'} = ${DEFAULT_TMPDIR}; # set the env var as well
-}
-
-$TopPwd = "${TOP_PWD}"; # *Only* needed when using it in-situ (i.e., INSTALLING=0).
-$InstLibDirGhc = "${libdir}";
-$InstLibExecDirGhc = "${libexecdir}";
-
-$Unlit = ( $INSTALLING ?
- "${InstLibExecDirGhc}/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 ?
- "${InstLibExecDirGhc}/hsp" :
- "${TopPwd}/ghc/compiler/hsp" );
-$HsTagsHelp =
- ( $INSTALLING ?
- "${InstLibExecDirGhc}/hstags-help" :
- "${TopPwd}/ghc/utils/hstags/hstags-help" );
-
-$Verbose = 0;
-$Append = '>';
-$DoCpp = 0;
-$Cpp_opts = '';
-$HsP_opts = '';
-@Files = ();
-
-while ($ARGV[0] =~ /^-./) {
- $_ = shift(@ARGV);
- /^--/ && last;
- /^-v/ && ($Verbose = 1, next);
- /^-a$/ && ($Append = '>>', next);
- /^-fglasgow-exts/ && ($HsP_opts .= ' -N', next);
- /^-optP(.*)/ && ($Cpp_opts .= " $1", next);
- /^-[UDI]/ && ($Cpp_opts .= " $_", next);
- /^-cpp/ && ($DoCpp = 1, next);
- /^-/ && next; # ignore the rest
- push(@Files, $_);
-}
-
-$DoHsCpp = ( ! $DoCpp ) ? 'cat'
- : "$HsCpp -D__HASKELL1__=2 -D__GLASGOW_HASKELL__=$ProjectVersionInt $Cpp_opts";
-
-# to find Prelude.hi and friends.
-$HsP_opts .= ( $INSTALLING ?
- "-J${InstLibDirGhc}/imports" :
- ( '-J' . join(' -J',split(/:/,${HSP_IMPORTS})) ));
-
-open(STDOUT, "$Append TAGS") || die "can't create TAGS";
-
-foreach $f ( @ARGV ) {
- # if file is in a dir && we are CPPing, then we add its dir to the -I list.
- if ( $DoCpp && $f =~ /(.+)\/[^\/]+$/ ) {
- $Idir = "-I$1";
- } else {
- $Idir = '';
- }
-
- if ( $f =~ /\.lhs$/ ) {
- $ToDo = "$Unlit $f - | $DoHsCpp $Idir | $HsP -E $HsP_opts | $HsTagsHelp $f > $tmp";
- } else {
- $ToDo = "$DoHsCpp $Idir < $f | $HsP -E $HsP_opts | $HsTagsHelp $f > $tmp";
- }
- print STDERR "$ToDo\n" if $Verbose;
- system($ToDo);
- $return_val = $?;
- die "Fatal error $return_val\n" if $return_val != 0;
-
- ($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`;
-}
-
-unlink $tmp;
diff --git a/utils/hstags/prefix.txt b/utils/hstags/prefix.txt
deleted file mode 100644
index b67c009c49..0000000000
--- a/utils/hstags/prefix.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# hstags - generating a tags file from Haskell source
-#
-# To use the script on your system, the following variable
-# needs to be set (and uncommented!), if it hasn't already
-# been set above:
-#
-#$libdir='/local/fp/lib/sparc-sun-sunos4/ghc-2.02';
-#