aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src/make.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-04-12 12:35:52 +0200
committerSiri Hansen <[email protected]>2017-04-12 12:35:52 +0200
commit1a2e7f14aafaac1209458dcedebd4fe723e0f302 (patch)
tree4fddb50cfcbd458ac60eff62ecd780eb1438d57e /lib/tools/src/make.erl
parent3a29920a05cedee8c1f7501ee7b1aa22e068efed (diff)
downloadotp-1a2e7f14aafaac1209458dcedebd4fe723e0f302.tar.gz
otp-1a2e7f14aafaac1209458dcedebd4fe723e0f302.tar.bz2
otp-1a2e7f14aafaac1209458dcedebd4fe723e0f302.zip
[tools/make] Add current directory to include path
This is to ensure that files are recompiled if a .hrl file in the current directory is changed.
Diffstat (limited to 'lib/tools/src/make.erl')
-rw-r--r--lib/tools/src/make.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tools/src/make.erl b/lib/tools/src/make.erl
index 60695febb4..0363dee02d 100644
--- a/lib/tools/src/make.erl
+++ b/lib/tools/src/make.erl
@@ -290,11 +290,12 @@ coerce_2_list(X) when is_atom(X) ->
coerce_2_list(X) ->
X.
-%%% If you an include file is found with a modification
+%%% If an include file is found with a modification
%%% time larger than the modification time of the object
%%% file, return true. Otherwise return false.
check_includes(File, IncludePath, ObjMTime) ->
- Path = [filename:dirname(File)|IncludePath],
+ {ok,Cwd} = file:get_cwd(),
+ Path = [Cwd,filename:dirname(File)|IncludePath],
case epp:open(File, Path, []) of
{ok, Epp} ->
check_includes2(Epp, File, ObjMTime);