INCATools / INCATools/ontology-development-kit

Change `clean` to a double colon rule?

Open
#1,284 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Dockerfile
Stars
375
Forks
69
Avg merge
3d 5h
Merged PRs (30d)
7

Description

The templated `Makefile`, of course, contains a `.PHONY` `clean` target:

https://github.com/INCATools/ontology-development-kit/blob/d045276cd1048014d84f9fbf8373a5057f58de1c/template/src/ontology/Makefile.jinja2#L1584-L1591

I've run into a case where that `clean` target is overridden in `{{ project.id }}.Makefile`, where a custom `clean` target was desired. This results in the original `clean` target being overwritten:

```
zp.Makefile:216: warning: overriding recipe for target 'clean'
Makefile:1023: warning: ignoring old recipe for target 'clean'
```

If the rules were defined with [double colon syntax](https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html) (`clean::`), it would be possible to run both without worrying about overrides.

(The same could possibly apply to `help`, if someone wanted to document additional key commands).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in template/src/ontology/Makefile.jinja2 around lines 1584-1591 and compare its clean rule with the custom clean rule in the generated project Makefile. Verify that the intended clean behavior can coexist without override warnings, and clarify whether the same treatment should also apply to help.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.