From patchwork Fri Sep 7 14:34:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 146210 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp1257675ljw; Fri, 7 Sep 2018 07:36:03 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb1FidShXAMZ6BVae6MZKn41ZXoFtSNaPsUlFX9zGc/qmQgQbEmWxR6+wFkGBszTi0lWmRz X-Received: by 2002:a62:9645:: with SMTP id c66-v6mr8934033pfe.56.1536330963001; Fri, 07 Sep 2018 07:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536330962; cv=none; d=google.com; s=arc-20160816; b=j6lFfJ7Z1+En0122bcuyxxHMvs/KEw43UUUIz+XbtNaYfp6ufJc3pCa8VNGHOsgHqU tIVU3d3BJ/wpTKxkv4Ozjhcsw6ERUq30h7jkjc4upgfT1R/E82aPwrI3iBDicGd2ouoI mtdX0oFZ97NErjsUEzk6FxFx68h/peHK7tgpF2gOI/iMZBhyj/13DCUql73McUkZiz7k sSSScakHPCiIX/LKFsq6A3pHwMPAqltQFirWPjTNFmAv+MolV7b8MhvM0WTtOA2jSXzf n2It3OwUtPLvOioD2Oxi3iSikRap1XiYXzCXdouAylbhx7SJnDFcyMwPPel1Xq3T7uCd 9nbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MTJMlsL/qn3+Dab4i8dJ2bnn9KxJOVfBWvsWQ3iChLM=; b=cRkqKILR/yoNhJr6Job6j75ugXDVxILJeaMAs4N0vVq85rqEtvfDUiP/PMNvzguzK1 emm7sYGrMCttEpwdGhdhxiOpfl1Yvh1JnTvLnT624/1mKyTQigFbNhkaIAUcsDniRluh p3pKfSMpZZW0U6/xHuq4iDJ4L8xmveDnFpmStQlCQGUX8Qxx5mZGfddhQBhNwwWgNyX+ //HEfYhw97tTuXxR03JIkuHYJj6f2m1iX7SelLSF8DeUNvDgIOn6rTnBybpwqID10+sa k/wdgiA0ln9fuZhVf2NzqC/TsLn9gO2snYnv33WO1ABh7weg0F9hriiz+oQ4kl44v6LQ lPKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LwGDDimF; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gn19si8173277plb.360.2018.09.07.07.36.02; Fri, 07 Sep 2018 07:36:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LwGDDimF; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728576AbeIGTRO (ORCPT + 5 others); Fri, 7 Sep 2018 15:17:14 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:34738 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727659AbeIGTRN (ORCPT ); Fri, 7 Sep 2018 15:17:13 -0400 Received: by mail-oi0-f68.google.com with SMTP id 13-v6so27710955ois.1 for ; Fri, 07 Sep 2018 07:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MTJMlsL/qn3+Dab4i8dJ2bnn9KxJOVfBWvsWQ3iChLM=; b=LwGDDimF6XRqHckkC2nHruCIBfW8R0074mLtWo+j4z7KEJV/Yi/JzZ/IkjNg+aQMzs Wrr8mfpu6mT4oyNNOsPwvr/tboAI0SnNdzPNldoF1zg0Gqkg271N4HGcmUozFFjtVA/O KIbeGEyTdxATnhHNaufH/r0KoQoQ4V10IeAlI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=MTJMlsL/qn3+Dab4i8dJ2bnn9KxJOVfBWvsWQ3iChLM=; b=XlGnZm/TRUTtMkodCA4cr7MAN/rFyQmYMMl18jg9Xxg/Jwy+0cYbDCYY/x8uUx3h4Y 9A+E5wZhdcE6UzV1RZFFRuexNHf/VJenCXPn9Va/lQXBkeffoxCRGKuwQRqjvwLz6mdH tMLveB+CpoK4iB5Yr2Nr4m6xliBqSNO9ELgEfPXwRaOSOVzP/BNZ0QaUsXzkVLfIlzSq 1BHsVkKurcmjtU0LIKvr7UiWNT1VYllWUEoz0UWtnemswkYW+265QlwaSquwOc6CuhHk SKvtMYLeWT1+x/Mkl6jqJuGPk6augI7goC3BszM05OL0g4iGk3F9QMBt6sjh/jGR6Ucb tY3w== X-Gm-Message-State: APzg51AjtkNKBlJad2slnxXb7M2dlrF+yuNRxZAopncDyqHOtCOYQLFB LxVHcy6ll4FdFszCZgMdDK5oVg== X-Received: by 2002:aca:ac54:: with SMTP id v81-v6mr8010762oie.1.1536330960021; Fri, 07 Sep 2018 07:36:00 -0700 (PDT) Received: from aura.cortijodelrio.net ([187.161.144.121]) by smtp.googlemail.com with ESMTPSA id i132-v6sm10306360oif.20.2018.09.07.07.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Sep 2018 07:35:58 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: linus.walleij@linaro.org, Fathi Boudra , =?utf-8?q?Daniel_D=C3=ADaz?= , Bamvor Jian Zhang , Bartosz Golaszewski , Shuah Khan , linux-gpio@vger.kernel.org (open list:GPIO MOCKUP DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 1/2] selftests: gpio: restructure Makefile Date: Fri, 7 Sep 2018 09:34:54 -0500 Message-Id: <1536330895-8391-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Fathi Boudra This patch cleans up the Makefile by restructuring a couple of things, namely: 1) change explicit paths in targets for variables 2) substitute a variable (BINARIES) for another, part of the selftests build system (TEST_PROGS_EXTENDED) 3) proper cleaning up of the EXTRA objects The resulting Makefile is much more readable and manageable. Signed-off-by: Fathi Boudra Signed-off-by: Daniel Díaz --- tools/testing/selftests/gpio/Makefile | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) -- 2.7.4 diff --git a/tools/testing/selftests/gpio/Makefile b/tools/testing/selftests/gpio/Makefile index 4665cdb..a4a01ec8 100644 --- a/tools/testing/selftests/gpio/Makefile +++ b/tools/testing/selftests/gpio/Makefile @@ -1,28 +1,26 @@ # SPDX-License-Identifier: GPL-2.0 +CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ +LDLIBS += -lmount -I/usr/include/libmount + TEST_PROGS := gpio-mockup.sh -TEST_FILES := gpio-mockup-sysfs.sh $(BINARIES) -BINARIES := gpio-mockup-chardev -EXTRA_PROGS := ../gpiogpio-event-mon ../gpiogpio-hammer ../gpiolsgpio -EXTRA_DIRS := ../gpioinclude/ -EXTRA_OBJS := ../gpiogpio-event-mon-in.o ../gpiogpio-event-mon.o -EXTRA_OBJS += ../gpiogpio-hammer-in.o ../gpiogpio-utils.o ../gpiolsgpio-in.o -EXTRA_OBJS += ../gpiolsgpio.o +TEST_FILES := gpio-mockup-sysfs.sh +TEST_PROGS_EXTENDED := gpio-mockup-chardev + +GPIODIR := ../../../gpio +GPIOOBJ := gpio-utils.o include ../lib.mk -all: $(BINARIES) +all: $(TEST_PROGS_EXTENDED) override define CLEAN - $(RM) $(BINARIES) $(EXTRA_PROGS) $(EXTRA_OBJS) - $(RM) -r $(EXTRA_DIRS) + $(RM) $(TEST_PROGS_EXTENDED) + $(MAKE) -C $(GPIODIR) clean endef -CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ -LDLIBS += -lmount -I/usr/include/libmount - -$(BINARIES):| khdr -$(BINARIES): ../../../gpio/gpio-utils.o +$(TEST_PROGS_EXTENDED):| khdr +$(TEST_PROGS_EXTENDED): $(GPIODIR)/$(GPIOOBJ) -../../../gpio/gpio-utils.o: - make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C ../../../gpio +$(GPIODIR)/$(GPIOOBJ): + $(MAKE) -C $(GPIODIR)