Skip to content

Simpler and more robust Makefile#451

Open
maxim-belkin wants to merge 2 commits intocarpentries:gh-pagesfrom
maxim-belkin:reworked-makefile
Open

Simpler and more robust Makefile#451
maxim-belkin wants to merge 2 commits intocarpentries:gh-pagesfrom
maxim-belkin:reworked-makefile

Conversation

@maxim-belkin
Copy link
Contributor

Reworked the Makefile to make it simpler (to understand) and more robust so that people with no experience with Make would see clear error messages when something is not working.

Clear error messages require things like:

target:
ifneq (, $(TOOL))
    @$(TOOL) subcommand
else
    $(error sorry can't do)
endif

To avoid repetition, I extracted these ifneq .... endif to commands.mk and created TOOL_CMD for each TOOL.

@maxim-belkin
Copy link
Contributor Author

@fmichonneau, did you want to discuss this PR or did you want someone else to look at it?

@fmichonneau
Copy link
Contributor

Overall, I like that this approach leads to more informative error messages. I do worry about the increasing complexity of the file. It would also make things easier to manage if everything was in a file, is it possible? Finally, we need to make sure that we can run make serve and make site without requiring an internet connection (it seems that the curl call would prevent this).

@maxim-belkin
Copy link
Contributor Author

I'll rebase this PR once #473 is merged and update it as requested so that we can discuss it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants