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

Add 'install-nodoc' target for make #890

Merged
merged 9 commits into from Apr 5, 2018

Conversation

jougs
Copy link
Contributor

@jougs jougs commented Feb 6, 2018

This fixes #153.

Unfortunately, CMake does not support custom code or conditionals in the install target. I therefore implemented this as an extension to the help extraction system itself.

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

@jougs Thanks for fixing this. Could you add a line to the INSTALL file documenting this possibility and have a look at the one questions I put into the code?

@@ -361,4 +361,8 @@ install( FILES LICENSE README.md NEWS
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)

add_custom_target( install-nodoc
COMMAND make NEST_INSTALL_NODOC=true install
Copy link
Contributor

Choose a reason for hiding this comment

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

Can I still use -j N with this?

Copy link
Contributor Author

@jougs jougs Feb 19, 2018

Choose a reason for hiding this comment

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

The short answer is yes.

The slightly longer answer is that my changes do not alter the behavior of your call to make for any target but install-nodoc. And for install -j N did not have an effect anyway as the installation is always performed serially in order to avoid problems with concurrent writes.

@heplesser heplesser added T: Enhancement New functionality, model or documentation ZC: Installation DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL S: Normal Handle this with default priority I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Feb 15, 2018
@jougs
Copy link
Contributor Author

jougs commented Feb 19, 2018

@heplesser: Thanks for the review. I've addressed your comments in my commit
2b16a06 and my reply to your question.

@terhorstd terhorstd added this to the NEST 2.16 milestone Mar 5, 2018
@heplesser
Copy link
Contributor

@jougs I can use the install-nodoc target, but it still installs the help.

@heplesser
Copy link
Contributor

@jougs I just sent you a PR adding a required "optional" flag. With this, things work in a way: as long as one only ever calls make with the install-nodoc, help will not get installed. If invoking a "naked" make, doc/help will be populated and then installed in all subsequent make invocations, even for target install-nodoc.

I wonder if a complete solution of this problem would require introduction of proper build and install configurations, such as deploy/develop/debug.

This makes the install-nodoc target work by first deleting the help directory,
creating help for the install target, install the help directory if it was
created, and generating the help index for the installed help directory if that
exists.
@jougs
Copy link
Contributor Author

jougs commented Apr 5, 2018

@heplesser: I've come up with a reasonably stable solution in my recent commits. Can you please test again? Thanks!

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

@jougs Great, thanks! I works! I just have two little details, see comments in the code.

@@ -152,6 +152,10 @@ def write_helpindex(helpdir):
---------------------------------------

"""

if not os.path.exists(helpdir):
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a comment explaining why just returning is fine instead of raising an error. In the future, we may not remember the logic behind the return here.

)

# Update the global help index to include all help files in
# the global installation directory for
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indentation.

Copy link
Contributor

@steffengraber steffengraber left a comment

Choose a reason for hiding this comment

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

Perfect, Works for me.

@heplesser heplesser merged commit fb3414a into nest:master Apr 5, 2018
@jougs jougs deleted the feature/add-install-nodoc branch November 25, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation ZC: Installation DO NOT USE THIS LABEL ZP: PR Created DO NOT USE THIS LABEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add install-nodoc target
4 participants