clean-localターゲット

autoconf/automake/libtoolを利用していて、cleanターゲットで行う作業を拡張したいことはたくさんあるのですが、その際には、cleanターゲットを定義するのではなく、clean-localターゲットを作って拡張するべきです(see http://sources.redhat.com/automake/automake.html#Extending)
そこまではよかったのですが、私のMakefile.amの記述の仕方が悪く、cleanターゲットからclean-localターゲットが呼ばれず、2時間ほども悩んでしまいました。
最初は、次のように記述していました。

.PHONY			: test tests check
test tests check	:
	/bin/sh -e $(top_builddir)/test/check.sh ising_local.parm
	/bin/sh -e $(top_builddir)/test/check.sh ising_cluster.parm

clean-local		:
	-rm -rf *.out.xml
	-rm -rf *.in.xml
	-rm -rf *.out.run1
	-rm -rf archive.*.xml result.*.txt

でもどうやら、(少なくともAutomake 1.9.6では)ターゲット名の後のスペース/タブは認識されず、次のように書かないといけないみたいです。

.PHONY: test tests check
test tests check:
	/bin/sh -e $(top_builddir)/test/check.sh ising_local.parm
	/bin/sh -e $(top_builddir)/test/check.sh ising_cluster.parm

clean-local:
	-rm -rf *.out.xml
	-rm -rf *.in.xml
	-rm -rf *.out.run1
	-rm -rf archive.*.xml result.*.txt