Commit 9546b1bc authored by simonmar's avatar simonmar

[project @ 2003-08-13 12:34:45 by simonmar]

Add Alex support.
parent e2314d3d
......@@ -877,6 +877,16 @@ HAPPY_VERSION = @HappyVersion@
#
GHC_HAPPY_OPTS = -agc
#
# Alex
#
ALEX = @AlexCmd@
ALEX_VERSION = @AlexVersion@
#
# Options to pass to Happy when we're going to compile the output with GHC
#
GHC_ALEX_OPTS = -g
#
# Haddock
#
......
......@@ -5,7 +5,7 @@
# This file defines Make variables for the
# option flags for each utility program
#
# $Id: opts.mk,v 1.31 2003/06/07 11:20:47 ross Exp $
# $Id: opts.mk,v 1.32 2003/08/13 12:34:46 simonmar Exp $
#
#################################################################################
......@@ -70,6 +70,7 @@ ILASM_OPTS = $(SRC_ILASM_OPTS) $(WAY$(_way)_ILASM_OPTS) $($*_ILASM_OPTS)
RUNTEST_OPTS = $(SRC_RUNTEST_OPTS) $(WAY$(_way)_RUNTEST_OPTS) \
$($*_RUNTEST_OPTS) $(EXTRA_RUNTEST_OPTS)
ALEX_OPTS = $(SRC_ALEX_OPTS) $($(HcFlavour)_ALEX_OPTS) $(WAY$(_way)_ALEX_OPTS) $($*_ALEX_OPTS) $(EXTRA_ALEX_OPTS)
AR_OPTS = $(SRC_AR_OPTS) $(WAY$(_way)_AR_OPTS) $(EXTRA_AR_OPTS)
AS_OPTS = $(SRC_AS_OPTS) $(WAY$(_way)_AS_OPTS) $(EXTRA_AS_OPTS)
BLD_DLL_OPTS = $(SRC_BLD_DLL_OPTS) $(WAY$(_way)_BLD_DLL_OPTS) $($*_HC_OPTS) $(EXTRA_BLD_DLL_OPTS)
......
......@@ -111,6 +111,7 @@ ALL_SRCS = $(wildcard $(patsubst ./%, %, \
$(patsubst %,%/*.lhs, . $(ALL_DIRS)) \
$(patsubst %,%/*.y, . $(ALL_DIRS)) \
$(patsubst %,%/*.ly, . $(ALL_DIRS)) \
$(patsubst %,%/*.x, . $(ALL_DIRS)) \
$(patsubst %,%/*.c, . $(ALL_DIRS)) \
$(patsubst %,%/*.hc, . $(ALL_DIRS)) \
$(patsubst %,%/*.S, . $(ALL_DIRS)) \
......@@ -136,6 +137,7 @@ HSC_SRCS = $(filter %.hsc, $(PRE_SRCS))
HAPPY_Y_SRCS = $(filter %.y, $(PRE_SRCS))
HAPPY_LY_SRCS = $(filter %.ly, $(PRE_SRCS))
HAPPY_SRCS = $(HAPPY_Y_SRCS) $(HAPPY_LY_SRCS)
ALEX_SRCS = $(filter %.x, $(PRE_SRCS))
DERIVED_GC_SRCS = $(patsubst %.gc, %.hs, $(GC_SRCS)) \
$(patsubst %.gc, %_stub_ffi.c, $(GC_SRCS)) \
......@@ -149,12 +151,15 @@ DERIVED_HSC_SRCS = $(patsubst %.hsc, %.hs, $(HSC_SRCS)) \
DERIVED_HAPPY_SRCS = $(patsubst %.y, %.hs, $(HAPPY_Y_SRCS)) \
$(patsubst %.ly, %.hs, $(HAPPY_LY_SRCS))
DERIVED_ALEX_SRCS = $(patsubst %.x, %.hs, $(ALEX_SRCS))
DERIVED_HC_SRCS = $(patsubst %.hs, %.hc, $(PRE_HS_SRCS)) \
$(patsubst %.lhs, %.hc, $(PRE_LHS_SRCS))
DERIVED_SRCS = $(DERIVED_GC_SRCS) \
$(DERIVED_HSC_SRCS) \
$(DERIVED_HAPPY_SRCS) \
$(DERIVED_ALEX_SRCS) \
$(DERIVED_HC_SRCS)
# EXCLUDED_SRCS can be set in the Makefile, otherwise it defaults to empty.
......@@ -163,6 +168,7 @@ EXCLUDED_HSC_SRCS = $(filter %.hsc, $(EXCLUDED_SRCS))
EXCLUDED_HAPPY_Y_SRCS = $(filter %.y, $(EXCLUDED_SRCS))
EXCLUDED_HAPPY_LY_SRCS = $(filter %.ly, $(EXCLUDED_SRCS))
EXCLUDED_HAPPY_SRCS = $(EXCLUDED_HAPPY_Y_SRCS) $(EXCLUDED_HAPPY_LY_SRCS)
EXCLUDED_ALEX_SRCS = $(filter %.x, $(EXCLUDED_SRCS))
EXCLUDED_HS_SRCS = $(filter %.hs, $(EXCLUDED_SRCS))
EXCLUDED_LHS_SRCS = $(filter %.lhs, $(EXCLUDED_SRCS))
EXCLUDED_DERIVED_SRCS = $(patsubst %.hsc, %.hs, $(EXCLUDED_HSC_SRCS)) \
......@@ -173,6 +179,7 @@ EXCLUDED_DERIVED_SRCS = $(patsubst %.hsc, %.hs, $(EXCLUDED_HSC_SRCS)) \
$(patsubst %.gc, %_stub_ffi.h, $(EXCLUDED_GC_SRCS)) \
$(patsubst %.y, %.hs, $(EXCLUDED_HAPPY_Y_SRCS)) \
$(patsubst %.ly, %.hs, $(EXCLUDED_HAPPY_LY_SRCS)) \
$(patsubst %.x, %.hs, $(EXCLUDED_ALEX_SRCS)) \
$(patsubst %.hs, %.hc, $(EXCLUDED_HS_SRCS)) \
$(patsubst %.lhs, %.hc, $(EXCLUDED_LHS_SRCS)) \
$(patsubst %.hs, %_stub.c, $(EXCLUDED_HS_SRCS)) \
......
......@@ -139,6 +139,13 @@ endif # BootingFromHc
%.hs : %.y
$(HAPPY) $(HAPPY_OPTS) $<
#-----------------------------------------------------------------------------
# Alex Suffix Rules
#
%.hs : %.x
$(ALEX) $(ALEX_OPTS) $<
#-----------------------------------------------------------------------------
# hsc2hs Suffix Rules
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment