-
Couldn't load subscription status.
- Fork 75
Makefile: don't skip 'docs' target #766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
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 already exists and has
no dependencies (or its dependencies are older), Make considers
it "up to date" and skips execution.
Used a .PHONY target to tell Make that 'docs' is not a real
file.
|
Thanks @webwarrior-ws good catch. Maybe the better approach here is actually move the docs target to a Makefile inside the docs folder? Let's try that approach in a 2nd commit and I will decide what looks better. |
82058f9 to
3fd5a69
Compare
| .fsdocs | ||
| docs/ | ||
| docs/* | ||
| !docs/Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@webwarrior-ws what is this change for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add Makefile in docs folder to git and not ignore it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah right thanks; btw maybe the reason 2nd commit of this PR doesn't work is because SUBDIRS var needs to be set? I don't remember this part about Make build system, please investigate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works now. Have to run make with --directory argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That defeats the purpose of having makefile targets because it makes it not fast to type (almost as long as dotnet fsi ../build.fsx --target Docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So abandon 2nd commit and use initial approach?
3fd5a69 to
eeef0ea
Compare
eeef0ea to
40ead10
Compare
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 already exists and has no dependencies (or its dependencies are older), Make considers it "up to date" and skips execution.
Used a .PHONY target to tell Make that 'docs' is not a real file.