Skip to content

Commit

Permalink
Fix booting again
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed May 28, 2013
1 parent 99351bc commit d2711be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions mk/boilerplate.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ show:
RM = rm -f
SIZE = size
STRIP = strip
PERL = /usr/bin/perl
CONTEXT_DIFF = diff -U 1
DEFAULT_TMPDIR = /tmp
EXECUTABLE_FILE = chmod +x

# Benchmarks controls which set of tests should be run
# You can run one or more of
Expand Down Expand Up @@ -97,6 +101,7 @@ endif
endif

MKDEPENDHS := $(HC) # ToDo: wrong, if $(HC) isn't GHC.
BOOT_HC := $(HC)

define get-ghc-rts-field # $1 = result variable, $2 = field name
$1 := $$(shell '$$(HC)' +RTS --info | grep '^ .("$2",' | tr -d '\r' | sed -e 's/.*", *"//' -e 's/")$$$$//')
Expand All @@ -108,6 +113,7 @@ endef

$(eval $(call get-ghc-rts-field,HC_VERSION,GHC version))
$(eval $(call get-ghc-field,SplitObjs,Object splitting supported))
$(eval $(call get-ghc-field,CC,C compiler command))

define ghc-ge # $1 = major version, $2 = minor version
HC_VERSION_GE_$1_$2 := $$(shell if [ `echo $$(HC_VERSION) | sed 's/\..*//'` -gt $1 ]; then echo YES; else if [ `echo $$(HC_VERSION) | sed 's/\..*//'` -ge $1 ] && [ `echo $$(HC_VERSION) | sed -e 's/[^.]*\.//' -e 's/\..*//'` -ge $2 ]; then echo YES; else echo NO; fi; fi)
Expand Down
2 changes: 1 addition & 1 deletion nofib-analyse/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include $(TOP)/mk/boilerplate.mk
PROG = nofib-analyse

$(PROG):
$(GHC) -O -cpp --make Main -o $(PROG)
$(BOOT_HC) -O -cpp --make Main -o $(PROG)

all :: $(PROG)

Expand Down

0 comments on commit d2711be

Please sign in to comment.