From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769AbcKRM75 (ORCPT ); Fri, 18 Nov 2016 07:59:57 -0500 Received: from szxga04-in.huawei.com ([119.145.14.52]:55171 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753189AbcKRM74 (ORCPT ); Fri, 18 Nov 2016 07:59:56 -0500 Subject: Re: [PATCH RFC 1/6] selftests: remove duplicated all and clean target To: Michael Ellerman , References: <1477047694-24122-1-git-send-email-bamvor.zhangjian@huawei.com> <1477047694-24122-2-git-send-email-bamvor.zhangjian@huawei.com> <87mvgxgjuu.fsf@concordia.ellerman.id.au> CC: , , , , Bamvor Zhang Jian From: "Zhangjian (Bamvor)" Message-ID: <1ffc34d0-0a4c-efd3-ed3d-6073b2ea32ac@huawei.com> Date: Fri, 18 Nov 2016 20:59:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <87mvgxgjuu.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.72.170] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Michael On 2016/11/18 18:31, Michael Ellerman wrote: >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)) Maybe I lost somewhere. I add these variable for all and clean target. They will be used to output the objects to OUTPUT directory. Could you please explain in details how should I do it for "all" target if I do not introduce TEST_GEN_PROGS, TEST_GEN_PROGS_EXTENDED and TEST_GEN_FILES? Regards Bamvor > > >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