Open gabrielmocanu opened 2 years ago
@gabrielmocanu isn't this done?
Not right now, we have a Makefile for each challenge. The issue was about introducing a single core Makefile and including it in another Makefile for each challenge without putting all rules. Right now, I don't know what is the best method.
As we talked on Discord, I think the best way is to have a common Makefile that will be placed somewhere (../../../../common/
) that will be symlinked in each challenge directory.
The reasoning for the symlink is to simplify the exporting of the challenge as an archive (by solving the symlink).
OK, so you mean like it is done in the template-public
repo?
The activity Makefile
references the common Makefile
.
OK, so you mean like it is done in the
template-public
repo? The activityMakefile
references the commonMakefile
.
Yes, that one. But I would symlink it in the local challenge directory. And the include line will turn into:
include activity.mk
Since Makefile is always 90% the same as the others my proposal is to use a general Makefile.
It should be something like:
It should contain a delete rule for the file with the flag. It should be placed in the root of the repo in the common folder, something like challenge.mk. Then in this Makefile for each challenge we should only import and assign the variables:
This is an example from the essentials repo.
CC: @carrrina for visibility.