Author: Matthijs Kooijman <matthijs@stdin.nl>
Description: Make sure that the .gimp.scm files are also cleaned on distclean.

Upstream cleans these files in the clean-gfx target, but that also
removes the generated .png files (which are also shipped in the
tarball), so we can't use that in the Debian clean rule. Instead, we'll
modify distclean to do the right thing.

--- a/scripts/Makefile.common
+++ b/scripts/Makefile.common
@@ -47,6 +47,9 @@
 	$(_V)-rm -rf $(SRC_DIR)/$(FILENAME_STUB) $(DIR_NAME_SRC) $(DIR_NAME)
 	$(_V)-rm -rf $(DIR_BASE)*nightly*.zip
 	$(_V)-rm -rf $(MD5_FILENAME)
+ifdef NEED_GIMP
+	$(_V)-rm -rf $(shell cat $(GRAPHICS_SOURCE_LIST_FILES) | grep -v "^#" | grep "\([pP][cCnN][xXgG]\)" | cut -d\  -f1 | sed "s/\.\([pP][cCnN][xXgG]\)/.scm/")
+endif # NEED_GIMP
 
 clean-gfx::
 ifdef NEED_GIMP
