From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAkF-0006s2-2A for qemu-devel@nongnu.org; Thu, 22 Sep 2016 16:37:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnAkC-00088D-9J for qemu-devel@nongnu.org; Thu, 22 Sep 2016 16:37:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnAkC-00087E-01 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 16:37:20 -0400 References: <20160922201916.20143-1-marcandre.lureau@redhat.com> From: Eric Blake Message-ID: <6bd5f0dc-488d-49a3-d3fc-1342ae66fca7@redhat.com> Date: Thu, 22 Sep 2016 15:37:18 -0500 MIME-Version: 1.0 In-Reply-To: <20160922201916.20143-1-marcandre.lureau@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P0f9nP8RH5nQ37WSqwQwHDRBUvD2medgH" Subject: Re: [Qemu-devel] [PATCH] build-sys: generate .gitignore List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --P0f9nP8RH5nQ37WSqwQwHDRBUvD2medgH From: Eric Blake To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org Message-ID: <6bd5f0dc-488d-49a3-d3fc-1342ae66fca7@redhat.com> Subject: Re: [PATCH] build-sys: generate .gitignore References: <20160922201916.20143-1-marcandre.lureau@redhat.com> In-Reply-To: <20160922201916.20143-1-marcandre.lureau@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/22/2016 03:19 PM, Marc-Andr=C3=A9 Lureau wrote: > It's too easy to forget about updating the .gitignore, so this is an > attempt at generating it instead. >=20 > Signed-off-by: Marc-Andr=C3=A9 Lureau > --- > tests/Makefile.include | 23 ++++++++++++-- > tests/.gitignore | 82 ------------------------------------------= -------- > 2 files changed, 20 insertions(+), 85 deletions(-) > delete mode 100644 tests/.gitignore Interesting that applying this to an incremental tree will show lots of unignored files until the next 'make check' run. But once that is done, I can confirm that it did result in the same 'git status' as pre-patch. >=20 > diff --git a/tests/Makefile.include b/tests/Makefile.include > index 93f2ba1..339126d 100644 > --- a/tests/Makefile.include > +++ b/tests/Makefile.include > @@ -785,6 +785,19 @@ $(patsubst %, check-%, $(check-qapi-schema-y)): ch= eck-%.json: $(SRC_PATH)/%.json > @diff -q $(SRC_PATH)/$*.exit $*.test.exit > =20 > # Consolidated targets > +tests-cleanfiles =3D *.o > +tests-cleanfiles =3D .gitignore > +tests-cleanfiles +=3D qht-bench$(EXESUF) > +tests-cleanfiles +=3D qapi-schema/*.test.* > +tests-cleanfiles +=3D test-qapi-event.[ch] > +tests-cleanfiles +=3D test-qapi-types.[ch] > +tests-cleanfiles +=3D test-qapi-visit.[ch] > +tests-cleanfiles +=3D test-qmp-introspect.[ch] > +tests-cleanfiles +=3D test-qmp-commands.h > +tests-cleanfiles +=3D test-qmp-marshal.c > +tests-cleanfiles +=3D $(subst tests/,,$(check-unit-y)) > +tests-cleanfiles +=3D $(subst tests/,,$(check-qtest-y)) > +tests-cleanfiles +=3D qemu-iotests/socket_scm_helper$(EXESUF) > =20 > .PHONY: check-qapi-schema check-qtest check-unit check check-clean > check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) > @@ -794,14 +807,18 @@ check-block: $(patsubst %,check-%, $(check-block-= y)) > check: check-qapi-schema check-unit check-qtest > check-clean: > $(MAKE) -C tests/tcg clean > - rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) > - rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$= (target)-y)) $(check-qtest-generic-y)) > - > + (cd tests && echo rm -rf $(tests-cleanfiles)) > clean: check-clean > =20 > # Build the help program automatically > =20 > all: $(QEMU_IOTESTS_HELPERS-y) > =20 > +ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMD= GOALS),,fail)) > +$(SRC_PATH)/tests/.gitignore: > + echo "$(tests-cleanfiles)" | xargs -n1 | sort > $@ This line is TOO noisy; you'll want to wrap it into a $(call quiet-command...). You could also do it with fewer processes and less typing, as: printf %s\\n $(tests-cleanfiles) | sort > $@ > +Makefile: $(SRC_PATH)/tests/.gitignore > +endif > + > -include $(wildcard tests/*.d) > -include $(wildcard tests/libqos/*.d) But the idea seems interesting; looking forward to v2 and comments from anyone else. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --P0f9nP8RH5nQ37WSqwQwHDRBUvD2medgH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX5ED+AAoJEKeha0olJ0Nq94oH/0uJGqd0kQumejr0418E2FQX 4Y7qMg6w4j4UTpr5hv4flFP8bmUaSEIkS626hHjFJyUoXje4K51tjHJ/6MhsgAMp 2lAaXOWclczIutX6NAWl68EVD4HkN68KhSqe88ua6/cp/rZiYSRcMWegidtAdeJY 2GQ7Qbn+l8TVechKHW/lUwkm9asSlaVlMtkuaF3DJmt5Oij1bkMi6C6m1dTcAMP/ eqE4wakljjn/izwwRcPBGdi+fJzZ7MO4NAHhHiyKx5/l0CFI0JyQlZuOo+uEVG41 1sgJIxxaZvEBeaUJgr0OuZtmcXPOU6n4V4OH96SLVJ9wtEOjRr1Xz5mE6cEnSKU= =6QVY -----END PGP SIGNATURE----- --P0f9nP8RH5nQ37WSqwQwHDRBUvD2medgH--