-
Notifications
You must be signed in to change notification settings - Fork 18
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
mkdir -p sharedir before touch #16
Conversation
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.
Sorry, didn't see that one. But better do it as an OO dependency. (And maybe the others need that as well?)
BTW, GNU make 4.2 now has syntax for multiple (parallel) targets in one rule (:&
instead of :
), which would make solutions like this obsolete. But of course, we cannot rely on such features (yet).
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.
I'd prefer a more direct solution: mkdir -p sharedir before touch (as the subject already says).
@mkdir -p $(SHARE) && touch $@
And while changing that issue, I also suggest to change
Then there are no stray empty files on the |
But this is actually the indirect solution! And it's exactly equivalent to the first version of this PR. I specifically requested above changes (doing mkdir via a order-only prerequisite) because:
|
I don't quite see the point because it's our local venv only (or our Docker image), and we=ocrd_all – except if you want to set |
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.
Thanks!
It's direct because it is easy for me to see where it is used. Which other rules need |
Then put it in |
Apart from the pattern rule:
@kba, you need to add |
Sure, why not! |
Sure, that's the same kind of code, so it's not really new. Automatically fine when putting the touched files in |
That makes the patch too trivial. What about adding |
Less is more. Took 3 devs to arrive at! And it's not even done yet.
What for? OO deps don't ever update their dependents due to being older (by design). The only reason for these pseudo-targets is to avoid installing the same pkg 11 times if the module has 11 CLIs, just because they are all mentioned in the same rule. There used to be no way to tell make that these targets are all built at once by the same recipe, except by formulating it as a pseudo-pattern rule (which is highly unreadable and next to incomprehensible). But no one wants to wait for or require GNU make 4.2. |
Or maybe we should in fact use pseudo-pattern rules to get the single-rule-multiple-output behaviour. That would not only eliminate the need for the above discussed pseudo-targets for numpy names, but also avoid running |
Done (along with rebase). |
Sorry, this was completely unrelated, as I can see now. The above is now in #25. |
@stweil are you ok with the current state of this PR, or do you insist we should change the make tokens of the pip targets for |
I think trivial is good. I like trivial. Can we merge this? It fixes the initial problem without complicating the Makefile further IMHO. |
Otherwise I get a build failure for
make ocrd-tesserocr-binarize
with a newly created venv.