diff --git a/src/incatools/odk/templates/_dynamic_files.jinja2 b/src/incatools/odk/templates/_dynamic_files.jinja2 index 07e3e9a..ee8ce69 100644 --- a/src/incatools/odk/templates/_dynamic_files.jinja2 +++ b/src/incatools/odk/templates/_dynamic_files.jinja2 @@ -191,6 +191,10 @@ Datatype: rdf:PlainLiteral imports/%_import.owl: mirror/%.owl echo "ERROR: You have configured your default module type to be custom; this behavior needs to be overwritten in {{ project.id }}.Makefile!" && touch $@ {% endif -%} + +.PHONY: clean +clean:: + # Add any custom cleaning logic here. {% if project.import_group.use_base_merging -%} {# diff --git a/src/incatools/odk/templates/src/ontology/Makefile.jinja2 b/src/incatools/odk/templates/src/ontology/Makefile.jinja2 index 8b16aee..13b3fe2 100644 --- a/src/incatools/odk/templates/src/ontology/Makefile.jinja2 +++ b/src/incatools/odk/templates/src/ontology/Makefile.jinja2 @@ -1585,8 +1585,11 @@ update_docs: # current directory is a way to ensure we only clean up directories that # are located below the current directory, regardless of the contents of # the *DIR variables. +# +# This is a double-colon rule to allow another clean target to be defined +# in {{ project.id }}.Makefile without overriding this one. .PHONY: clean -clean:{% if project.use_dosdps %} +clean::{% if project.use_dosdps %} $(MAKE) pattern_clean{%- endif %} for dir in $(MIRRORDIR) $(TMPDIR) $(UPDATEREPODIR) ; do \ reldir=$$(realpath --relative-to=$$(pwd) $$dir) ; \