Skip to content

Commit 57ee7bf

Browse files
committed
Fix absolute path for -f and update readme
1 parent d09eefd commit 57ee7bf

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ Lua. If you are familiar with Make, you can learn Knit very quickly.
1515
Knit tracks more of your build to give you better incremental builds. For
1616
example, Knit automatically adds an implicit dependency on a rule's recipe, so
1717
if you change a recipe (either directly or through a variable change), Knit
18-
will automatically re-run all rules that were affected.
18+
will automatically re-run all rules that were affected. Knit will also skip
19+
build steps dynamically if it can determine that they will be unchanged from
20+
the previous run (even if earlier dependencies were changed).
1921

2022
Knit has support for namespaced sub-builds that execute relative to their
2123
directory, but Knit avoids build fragmentation because sub-builds don't rely on
@@ -32,8 +34,11 @@ will be useful to you too. Everyone hates something about their build system so
3234
if you have feedback or a request, let me know! The project is new enough that
3335
your feedback may be seriously taken into account.
3436

35-
I have written an article with more details about Knit
36-
[here](https://zyedidia.github.io/blog/posts/3-knit-better-make/).
37+
**Articles**: I have written two articles with more details about Knit
38+
[here](https://zyedidia.github.io/blog/posts/3-knit-better-make/) and
39+
[here](https://zyedidia.github.io/blog/posts/4-incremental-d-knit/) (this
40+
article is specifically about D, but the optimization Knit applies is general
41+
and not tied to D specifically).
3742

3843
# Features
3944

config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ func DefaultBuildFile() (string, bool) {
4646
}
4747

4848
func FindBuildFile(name string) (string, string, error) {
49+
if filepath.IsAbs(name) {
50+
if existsFile(name) {
51+
return name, filepath.Dir(name), nil
52+
} else {
53+
return "", "", errors.New("does not exist")
54+
}
55+
}
56+
4957
wd, err := os.Getwd()
5058
if err != nil {
5159
return "", "", err

0 commit comments

Comments
 (0)