From: sof Date: Thu, 13 Mar 1997 09:38:55 +0000 (+0000) Subject: [project @ 1997-03-13 09:34:46 by sof] X-Git-Tag: Approximately_1000_patches_recorded~814 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6ed362184b7bc9b7164ecfa69f6906d51d564c92;p=ghc-hetmet.git [project @ 1997-03-13 09:34:46 by sof] Makefile following new setup --- diff --git a/ghc/utils/Makefile b/ghc/utils/Makefile index 4455397..7048984 100644 --- a/ghc/utils/Makefile +++ b/ghc/utils/Makefile @@ -1,20 +1,28 @@ -TOP=../.. -include $(TOP)/ghc/mk/ghc.mk +TOP=.. +include $(TOP)/mk/boilerplate.mk +# +# No ways stuff in here (and further below), please +# +export WAYS= + +ifneq "$(BIN_DIST_NAME)" "" +# We're doing a binary-dist, descend into a subset of the dirs. +SUBDIRS = hp2ps hscpp hstags mkdependHS stat2resid unlit +else SUBDIRS = hp2ps \ hscpp \ + hstags \ mkdependHS \ + parallel \ stat2resid \ ugen \ unlit -# parallel \ - -# hstags -# not ready to go for 2.01 +endif # "heap-view" is not in the list because (a) it requires # a Haskell compiler (which you may not have yet), and (b) you are # unlikely to want it desperately. It is easy to build once you have # a Haskell compiler and if you want it. -include $(TOP)/mk/subdir.mk +include $(TOP)/mk/target.mk diff --git a/ghc/utils/heap-view/Makefile b/ghc/utils/heap-view/Makefile index c35ae45..2d8a819 100644 --- a/ghc/utils/heap-view/Makefile +++ b/ghc/utils/heap-view/Makefile @@ -1,17 +1,15 @@ -#----------------------------------------------------------------------------- -# $Id: Makefile,v 1.2 1996/11/21 16:48:45 simonm Exp $ +#--------------------------------------------------------------------- +# $Id: Makefile,v 1.3 1997/03/13 09:36:28 sof Exp $ +# +#--------------------------------------------------------------------- -# Todo: generalise this to use HSprog.mk or something. +TOP=../.. +include $(TOP)/mk/boilerplate.mk -TOP=../../.. -HaskellSuffixRules = YES -include $(TOP)/ghc/mk/ghc.mk - -PROGRAMS = graph hpView hpView2 - -HC_OPTS = -hi-diffs -fglasgow-exts -fhaskell-1.3 -O -L/usr/X11/lib -cpp -CC_OPTS = -ansi -I/usr/X11/include +PROGRAMS = graph hpView hpView2 +SRC_HC_OPTS += -hi-diffs -fglasgow-exts -fhaskell-1.3 -O -L/usr/X11/lib -cpp +SRC_CC_OPTS += -ansi -I/usr/X11/include # ToDo: use AC_PATH_X in configure to get lib/include dirs for X. OBJS_graph = Graph.o HaskXLib.o @@ -21,36 +19,18 @@ OBJS_hpView2 = HpView2.o Parse.o HaskXLib.o all :: $(PROGRAMS) graph : $(OBJS_graph) - $(HC) -o $@ $(HCFLAGS) $(LDOPTIONS) $(OBJS_graph) -lX11 + $(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(OBJS_graph) -lX11 hpView : $(OBJS_hpView) - $(HC) -o $@ $(HCFLAGS) $(LDOPTIONS) $(OBJS_hpView) -lX11 + $(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(OBJS_hpView) -lX11 hpView2 : $(OBJS_hpView2) - $(HC) -o $@ $(HCFLAGS) $(LDOPTIONS) $(OBJS_hpView2) -lX11 + $(HC) -o $@ $(HC_OPTS) $(LD_OPTS) $(OBJS_hpView2) -lX11 HaskXLib.o : HaskXLib.c - $(CC) -c $(CFLAGS) HaskXLib.c - -install :: $(PROGRAMS) - $(INSTALL) $(INSTBINFLAGS) graph $(DESTDIR) - $(INSTALL) $(INSTBINFLAGS) hpView $(DESTDIR) - $(INSTALL) $(INSTBINFLAGS) hpView2 $(DESTDIR) - -clean :: - $(RM) $(PROGRAMS) - -HS_DEP_SRCS = Graph.lhs HpView.lhs HpView2.lhs Parse.lhs -include $(TOP)/mk/hsdepend.mk - -tags :: $(HS_DEP_SRCS) - $(HSTAGS) $(HSTAGSFLAGS) $(HS_DEP_SRCS) - -# DO NOT DELETE: Beginning of Haskell dependencies -Graph.o : Graph.lhs -HpView.o : HpView.lhs -HpView.o : ./Parse.hi -HpView2.o : HpView2.lhs -HpView2.o : ./Parse.hi -Parse.o : Parse.lhs -# DO NOT DELETE: End of Haskell dependencies + $(CC) -c $(CC_OPTS) HaskXLib.c + +INSTALL_PROGS += $(PROGRAMS) +CLEAN_FILES += $(PROGRAMS) + +include $(TOP)/mk/target.mk diff --git a/ghc/utils/hp2ps/Makefile b/ghc/utils/hp2ps/Makefile index 728a8ac..90626ac 100644 --- a/ghc/utils/hp2ps/Makefile +++ b/ghc/utils/hp2ps/Makefile @@ -1,28 +1,14 @@ -TOP=../../.. -include $(TOP)/ghc/mk/ghc.mk +TOP=../.. +include $(TOP)/mk/boilerplate.mk +WAYS= -SRCS = \ - AuxFile.c \ - Axes.c \ - AreaBelow.c \ - Curves.c \ - Deviation.c \ - Dimensions.c \ - Error.c \ - HpFile.c \ - Key.c \ - Main.c \ - Marks.c \ - TopTwenty.c \ - TraceElement.c \ - PsFile.c \ - Reorder.c \ - Scale.c \ - Shade.c \ - Utilities.c +C_SRCS = $(wildcard *.c) +H_SRCS = $(wildcard *.h) +C_PROG = hp2ps + +INSTALL_PROGS += $(C_PROG) -PROG = hp2ps -DESTDIR = $(INSTBINDIR_GHC) LIBS = -lm -include $(TOP)/mk/Cprog.mk +CLEAN_FILES += $(C_OBJS) $(C_PROG) +include $(TOP)/mk/target.mk diff --git a/ghc/utils/hscpp/Makefile b/ghc/utils/hscpp/Makefile index 28316c5..003196f 100644 --- a/ghc/utils/hscpp/Makefile +++ b/ghc/utils/hscpp/Makefile @@ -1,12 +1,20 @@ -TOP=../../.. -include $(TOP)/ghc/mk/ghc.mk +TOP=../.. +include $(TOP)/mk/boilerplate.mk +WAYS= + +SCRIPT_PROG=hscpp +SCRIPT_OBJS=hscpp.prl +SCRIPT_SUBST_VARS=RAWCPP -PROG=hscpp # no INTERP: do *not* want #! script stuck on the front -SRC=hscpp.prl -DESTDIR=$(INSTLIBDIR_GHC) +# what's the deal? I'll add it for now -- SOF +INTERP=$(PERL) -# PerlTagsTarget( *.prl ) /* nothing for the Bourne shell scripts */ +# +# install setup +# +INSTALL_LIBEXECS += $(SCRIPT_PROG) +CLEAN_FILES += $(SCRIPT_PROG) -include $(TOP)/mk/script.mk +include $(TOP)/mk/target.mk diff --git a/ghc/utils/hscpp/hscpp.prl b/ghc/utils/hscpp/hscpp.prl index 74de86c..c08080d 100644 --- a/ghc/utils/hscpp/hscpp.prl +++ b/ghc/utils/hscpp/hscpp.prl @@ -1,12 +1,12 @@ -eval "exec perl -S $0 $*" - if $running_under_some_random_shell; +# +#eval "exec perl -S $0 $*" +# if $running_under_some_random_shell; # # reads CPP output and turns #line things into appropriate Haskell # pragmas # # considered to be GHC-project specific # -# # OPTIONALLY processes GENERATE_SPECS pragmas # when give flag -genSPECS # @@ -45,6 +45,13 @@ eval "exec perl -S $0 $*" # # Note: There must be no white space between { }s # Use ( )s around type names when separation is required +# +# +# NOTE: this script needs RAWCPP set in order to do something +# useful: +# +#$RAWCPP=''; +# $Verbose = 0; @@ -69,7 +76,7 @@ while ($#ARGV >= 0 && $ARGV[0] eq '-v' || $ARGV[0] =~ /^-genSPECS/) { } #ToDo: print a version number ? -$OrigCpp = '$(RAWCPP)'; +$OrigCpp = ${RAWCPP}; if ( $OrigCpp =~ /(\S+)\s+(.*)/ ) { $cmd = $1;