Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/incatools/odk/templates/_dynamic_files.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t object to putting a dummy rule in the custom Makefile as a way to let users know that they can add their own custom cleaning logic, but I have two issues here:

(1) The rule should be moved out of the Jinja conditional block that opens on line 187 ( {% if project.import_group is defined -%}), because there’s no reason why that rule should only be added when the project defines a import_group.

(2) The “add any custom cleaning logic here” comment should be moved outside of the recipe. Right now, it is part of the recipe, which means that make will display the comment when the target is invoked:

$ make clean
[ ... normal output of the standard clean rule ... ]
# Add any custom cleaning logic here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake on #1. I saw the endif tag and didn't realize it was nested. I was trying to get the clean rule at the end of the file.

{% if project.import_group.use_base_merging -%}
{#

Expand Down
5 changes: 4 additions & 1 deletion src/incatools/odk/templates/src/ontology/Makefile.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -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) ; \
Expand Down