Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753003AbcKRKb0 (ORCPT ); Fri, 18 Nov 2016 05:31:26 -0500 Received: from ozlabs.org ([103.22.144.67]:41223 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751617AbcKRKbY (ORCPT ); Fri, 18 Nov 2016 05:31:24 -0500 From: Michael Ellerman To: bamvor.zhangjian@huawei.com, shuahkh@osg.samsung.com Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@linaro.org, broonie@kernel.org Subject: Re: [PATCH RFC 1/6] selftests: remove duplicated all and clean target In-Reply-To: <1477047694-24122-2-git-send-email-bamvor.zhangjian@huawei.com> References: <1477047694-24122-1-git-send-email-bamvor.zhangjian@huawei.com> <1477047694-24122-2-git-send-email-bamvor.zhangjian@huawei.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Fri, 18 Nov 2016 21:31:21 +1100 Message-ID: <87mvgxgjuu.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1018 Lines: 32 Hi Bamvor, bamvor.zhangjian@huawei.com writes: > From: Bamvor Jian Zhang > > Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to > indicate the default test program, extended test program and test files. > These lead to duplicated all and clean targets. > > In order to remove them, introduce TEST_GEN_PROGS, > TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled > objected. It's nice to be able to drop the clean rules, but renaming all those variables causes a lot of churn. I think it would be better if we add a new variable, maybe NO_CLEAN, which can be used to specify anything in TEST_PROGS/EXTENDED which should *not* be cleaned. And then the default clean rule will just do: clean: $(RM) -fr $(filter-out $(NO_CLEAN),$(TEST_PROGS)) I think that would require less changes overall, because most tests just want to build some files, run them, and then clean them. The tests that need to do more elaborate things are the exception. cheers