-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
Milestone
Description
The templated Makefile, of course, contains a .PHONY clean target:
ontology-development-kit/template/src/ontology/Makefile.jinja2
Lines 1584 to 1591 in d045276
| .PHONY: clean | |
| clean:{% if project.use_dosdps %} | |
| $(MAKE) pattern_clean{%- endif %} | |
| for dir in $(MIRRORDIR) $(TMPDIR) $(UPDATEREPODIR) ; do \ | |
| reldir=$$(realpath --relative-to=$$(pwd) $$dir) ; \ | |
| case $$reldir in .*|"") ;; *) rm -rf $$reldir/* ;; esac \ | |
| done | |
| rm -f $(CLEANFILES) |
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 (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).