Add the requirements target in order to prompt the user to install the
needed dependencies in order to be able to run make run successfully.
Details
- Reviewers
ygy debdrup imp - Group Reviewers
docs - Commits
- R9:e7edca45ba9f: documentation/Makefile: add requirements target
Deinstall/Install the required packages then launch make run
Diff Detail
- Repository
- R9 FreeBSD doc repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
After cloning the docs.git repository, I tried to run make run then it ends in lot of errors, so I thought it might be nice if the code prompt the user to install the minimal needed and missing packages to be able to use make run. Afterwards, I see it was mentioned in the fdp primer documentation in Chapter 2.1, but I like when the code prompt for what it's required to do. Alternatively, we could also just recommend to install textproc/docproj, but it's not the minimal way. Let me know what do you think.
IMO we could indeed recommend textproc/docproj. If we are going with this minimal approach, maybe try all checks and pop up the recommendations all at once, to avoid people having to run it multiple times to satisfy all dependencies? (and we can even recommend both)
I think it would be better to check for the individual component parts, as @ygy suggests, and if any of them aren't found, recommend installing ports/textproc/docproj - but only print the error message once, even if multiple dependencies aren't found.
It should be possible to do this via .if and .elif BSD make macros, as documented in make(1) and use of another phony (ie. internal) environment variable.
I feel like this change also needs to incorporate https://reviews.freebsd.org/D30176 somehow - maybe check the platform first, then remove the tests that depend on absolute paths?
Rewrite using bmake(1) instead of using shell
Recommend only to install docproj package to avoid multiples runs to
satisfy dependencies as suggested by @ygy
documentation/Makefile | ||
---|---|---|
48 | Is LOCALBASE defined here? That would be better than hard coding /usr/local/ |