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 target names for PDF are confusing #2217

Closed
sydb opened this issue Jan 10, 2022 · 4 comments · Fixed by #2230
Closed

Makefile target names for PDF are confusing #2217

sydb opened this issue Jan 10, 2022 · 4 comments · Fixed by #2230

Comments

@sydb
Copy link
Member

sydb commented Jan 10, 2022

The Makefile has 3 targets for PDF: Guidelines-pdf:, pdf-complete:, and pdf:. When I inadvertently use the wrong one, you can chalk it up to my being a PDF-generation novice. But @martindholmes just made the same mistake, too, and he is well versed in this stuff. So I claim the names are misleading, and plan to change them:

  • pdf: That which a user should use to build the PDF version of the Guidelines — stays the same
  • Guielines-pdf: That which runs the first part of building the PDF version, running the pdfonce target in the antbuilder.xml file (after running check.stamp, p5.xml, and checking Utilities/guidelines-latex.xsl) — rename to pdf-init
  • pdf-complete: That which runs the final part of building the PDF version, running the pdfrest target in the antbuilder.xml file (why doesn’t it run Guidelines-pdf: first, anyway?) — rename to pdf-finish
@sydb sydb changed the title Makefile target names for PDF are confusion Makefile target names for PDF are confusing Jan 10, 2022
@sydb sydb added this to the Guidelines 4.4.0 milestone Jan 10, 2022
@peterstadler
Copy link
Member

The idea of improving those targets sounds good to me. As always, naming issues are the hardest!
While I intuitively (seem to) understand pdf-init in the sense that it's some (pre)processing step and not finished yet, I find it hard to distinguish pdf and pdf-finish. Is the former more "finished" than the latter?
Perhaps it might be better to simply enumerate like pdf-step-1, pdf-step-2, pdf-step-3 and have an alias pdf for the last one?

@sydb
Copy link
Member Author

sydb commented Jan 11, 2022

Good point. I think step names pdf-step-1 and pdf-step-2 are fine, perhaps even better. (The only slight drawback is you have to go look to see if there is a step 3 or not; but if it is less confusing, that is a small price to pay IMHO.)

How about just pdf-initial-step and pdf-final-step (names to deliberately map to the descriptions of @part :-)?

The pdf step would be an alias for pdf-step-1 followed by pdf-step-2, unless we actually want to change how the Makefile executes stuff, which I do not mind, but had not planned.

@peterstadler
Copy link
Member

Ok, so do we really need to keep the second step (on its own, without calling the first run first)? That might have some benefit for debugging, but in general you always need the first step before running the second. And since we are renaming things, dependent software (if any) will need to be updated anyway.
Hence we could go for only pdf-init and pdf (with a dependency on pdf-init) or am I missing something?

@sydb
Copy link
Member Author

sydb commented Feb 18, 2022

Note: PR 2230 implements @peterstadler’s idea.

@peterstadler peterstadler linked a pull request Apr 8, 2022 that will close this issue
peterstadler added a commit to TEIC/Jenkins that referenced this issue Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants