styles icon indicating copy to clipboard operation
styles copied to clipboard

Simpler and more robust Makefile

Open maxim-belkin opened this issue 4 years ago • 3 comments

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 avatar Dec 21 '19 00:12 maxim-belkin

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

maxim-belkin avatar Feb 12 '20 17:02 maxim-belkin

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).

fmichonneau avatar Feb 26 '20 14:02 fmichonneau

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

maxim-belkin avatar Jul 10 '20 14:07 maxim-belkin