Skip to content
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

Makefile: Use order-only deps for directories #2728

Merged
merged 3 commits into from
Nov 12, 2018
Merged

Conversation

glebm
Copy link
Contributor

@glebm glebm commented Nov 12, 2018

See https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

With this PR the targets only depend on directories' existence, but not on their timestamps.

Fixes #2727, fixes #1992, fixes #1433.

@glebm
Copy link
Contributor Author

glebm commented Nov 12, 2018

@sgbeal I think this might also solve the problem described in #2727. Does it?

@sgbeal
Copy link

sgbeal commented Nov 12, 2018

@glebm if i knew how to use git/github properly, and could figure out how to pull this for a local test, i could probably tell you that :/. (i'm a Fossil SCM guy, not a git guy :/) i have no personal experience with order-only prerequisites, so i can't say with certainty whether it resolves the problem.

@glebm
Copy link
Contributor Author

glebm commented Nov 12, 2018

@sgbeal Like this:

git clone https://github.com/glebm/libsass.git && cd libsass && git checkout patch-2

@sgbeal
Copy link

sgbeal commented Nov 12, 2018

@glebm

 [stephan@host:~/cvs/libsass]$ git checkout patch-2
 error: pathspec 'patch-2' did not match any file(s) known to git.

That's after doing a fresh clone.

@glebm
Copy link
Contributor Author

glebm commented Nov 12, 2018

OK, try git checkout origin/patch-2 or git checkout origin patch-2

@mgreter mgreter self-requested a review November 12, 2018 11:28
Copy link
Contributor

@mgreter mgreter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally someone found the real solution 👍 if I only knew about order-only deps, was looking for this up and down the documentation for make 😃 also tested it quickly on my windows machine and seems to work.

@mgreter
Copy link
Contributor

mgreter commented Nov 12, 2018

P.s. git clone https://github.com/glebm/libsass.git --branch patch-2

@sgbeal
Copy link

sgbeal commented Nov 12, 2018

@glebm Unfortunately:

$ git checkout origin/patch-2
error: pathspec 'origin/patch-2' did not match any file(s) known to git.
$ git checkout origin patch-2
error: pathspec 'patch-2' did not match any file(s) known to git.

@mgreter that does the trick.

This is exactly why i'm not a git guy - even the most banal operations are cryptic :/.

So, after building...

[stephan@host:~/cvs/libsass]$ m install PREFIX=$HOME
'lib/libsass.a' -> '/home/stephan/lib/libsass.a'

(noting that ~/lib existed beforehand)

Success!

@xzyfer
Copy link
Contributor

xzyfer commented Nov 12, 2018

Thank you all for seeing this through ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants