Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tobias Decking
GHC
Commits
b36b42fd
Commit
b36b42fd
authored
Jan 22, 2011
by
Ian Lynagh
Browse files
Use := when assigning the result of $(wildcard ...)
Avoids repeated evaluations of things that need system calls etc
parent
295016c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
rts/ghc.mk
View file @
b36b42fd
...
...
@@ -35,12 +35,13 @@ else
ALL_DIRS
+=
posix
endif
EXCLUDED_SRCS
:=
EXCLUDED_SRCS
+=
rts/Main.c
EXCLUDED_SRCS
+=
rts/parallel/SysMan.c
EXCLUDED_SRCS
+=
$(
wildcard
rts/Vis
*
.c
)
rts_C_SRCS
=
$(
filter-out
$(EXCLUDED_SRCS)
,
$(
wildcard
rts/
*
.c
$(
foreach
dir
,
$(ALL_DIRS)
,rts/
$(dir)
/
*
.c
)))
rts_CMM_SRCS
=
$(
wildcard
rts/
*
.cmm
)
rts_C_SRCS
:
=
$(
filter-out
$(EXCLUDED_SRCS)
,
$(
wildcard
rts/
*
.c
$(
foreach
dir
,
$(ALL_DIRS)
,rts/
$(dir)
/
*
.c
)))
rts_CMM_SRCS
:
=
$(
wildcard
rts/
*
.cmm
)
# Don't compile .S files when bootstrapping a new arch
ifneq
"$(PORTING_HOST)" "YES"
...
...
@@ -67,7 +68,7 @@ rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c | $$(dir $$@)/.
rts/dist/build/sm/Scav_thr.c
:
rts/sm/Scav.c | $$(dir $$@)/.
cp
$<
$@
rts_H_FILES
=
$(
wildcard
includes/
*
.h
)
$(
wildcard
rts/
*
.h
)
rts_H_FILES
:
=
$(
wildcard
includes/
*
.h
)
$(
wildcard
rts/
*
.h
)
ifeq
"$(USE_DTRACE)" "YES"
DTRACEPROBES_H
=
rts/dist/build/RtsProbes.h
...
...
utils/ghc-cabal/Main.hs
View file @
b36b42fd
...
...
@@ -358,7 +358,7 @@ generate config_args distdir directory
variablePrefix
++
"_EXTRA_LIBRARIES = "
++
unwords
(
extraLibs
bi
),
variablePrefix
++
"_EXTRA_LIBDIRS = "
++
unwords
(
extraLibDirs
bi
),
variablePrefix
++
"_C_SRCS = "
++
unwords
(
cSources
bi
),
variablePrefix
++
"_CMM_SRCS = $(addprefix cbits/,$(notdir $(wildcard "
++
directory
++
"/cbits/*.cmm)))"
,
variablePrefix
++
"_CMM_SRCS
:
= $(addprefix cbits/,$(notdir $(wildcard "
++
directory
++
"/cbits/*.cmm)))"
,
variablePrefix
++
"_DATA_FILES = "
++
unwords
(
dataFiles
pd
),
-- XXX This includes things it shouldn't, like:
-- -odir dist-bootstrapping/build
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment