Skip to content

Conversation

@webwarrior-ws
Copy link
Contributor

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.

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.
@knocte
Copy link
Collaborator

knocte commented Aug 18, 2025

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.

.fsdocs
docs/
docs/*
!docs/Makefile
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

@knocte knocte Aug 21, 2025

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)

Copy link
Contributor Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants