Skip to content

Commit 1d47d7c

Browse files
webwarrior-wsknocte
authored andcommitted
Makefile: don't skip 'docs' target
If there is a file or directory named the same as target ('docs' in this case) in current directory, Make treats that target as a file target. Since the file (dir in this case) already exists and has no dependencies (or its dependencies are older), Make considered it "up to date" and skipped execution. To avoid this, we now use a .PHONY target to tell Make that 'docs' is not a real file. Fixes #768
1 parent 8c82599 commit 1d47d7c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ FodyWeavers.xsd
405405
tmp/
406406
temp/
407407
.fsdocs
408-
docs/
408+
docs/*
409+
!docs/Makefile
409410

410411
# ===================================================
411412
# OS files

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ check:
88
selfcheck:
99
dotnet fsi build.fsx --target SelfCheck
1010

11+
# added docs tatget to .PHONY target because, otherwise, as 'docs' dir already exists
12+
# then Make would consider it "up to date" and would skip execution of the target
13+
.PHONY: docs
1114
docs:
12-
dotnet fsi build.fsx --target Docs
15+
$(MAKE) --directory docs
1316

docs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
all:
2+
dotnet fsi ../build.fsx --target Docs

0 commit comments

Comments
 (0)