Skip to content

Commit e11768c

Browse files
authored
Merge pull request #6889 from kmicklas/rebuild-all-extra-source-files
Rebuild on changes in all extra-source-files
2 parents 5ce6b08 + ea8e60f commit e11768c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

cabal-install/Distribution/Client/SourceFiles.hs

+1-7
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,8 @@ needBuildInfo pkg_descr bi modules = do
150150
, jsSources bi
151151
, cmmSources bi
152152
, asmSources bi
153+
, extraSrcFiles pkg_descr
153154
]
154-
-- A MASSIVE HACK to (1) make sure we rebuild when header
155-
-- files change, but (2) not have to rebuild when anything
156-
-- in extra-src-files changes (most of these won't affect
157-
-- compilation). It would be even better if we knew on a
158-
-- per-component basis which headers would be used but that
159-
-- seems to be too difficult.
160-
traverse_ needIfExists (filter ((==".h").takeExtension) (extraSrcFiles pkg_descr))
161155
for_ (installIncludes bi) $ \f ->
162156
findFileMonitored ("." : includeDirs bi) f
163157
>>= maybe (return ()) need

changelog.d/issue-4746

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
synopsis: all extra-source-files are change-tracked
2+
packages: cabal-install
3+
issues: #4746

0 commit comments

Comments
 (0)