From patchwork Mon Aug 31 09:28:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1354251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=QslBh5Gd; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=casper.20170209 header.b=QW3y2BBq; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bg4gG5KQbz9sTg for ; Mon, 31 Aug 2020 19:30:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=dXxtlPftanKsq01B3gm+nB7lDGdOy/icEZmU0mHz/Ag=; b=QslBh5GdtalFbNePgre8/vyhZ 8nexVF91O5yCFM9OvZ7KI9HRlNm6SW0mnVuDrNRQ65EjbwVlAZjKk8K3GyTJUqOzbtfFpSRyIb5KL mMpnur6yt7Ib8T0UTlsQ0arbPVvK8VzqzpGAQfrE7qyYW6qvWDihFOZFtnEMSuqKVzaNnOzw4D9VI 67ZtkJATUqhhhhUIF2lOg4nK3AzCGgIV2nwP3KxaU2RtZIlY2clR7cB3SPi6D+XUGC46TC/r4jAzP GLX8WSncYcAAQduLWxuKTjfd0FhUayf2JDXa1NJZugSjyMKzxEVVSvBGo+U0GBdAqehJ+iPyJ1xFX S/uyU4QHA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCg81-00075t-PF; Mon, 31 Aug 2020 09:29:29 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCg80-00075b-Ut for hostap@merlin.infradead.org; Mon, 31 Aug 2020 09:29:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=bbIGUZaYOk09C/YMwG9ycIHCzMPp+Sha4+UgEALpfaI=; b=QW3y2BBqCw28y0sZYOWznzI2O1 0KyuTgU8DYUhmZXoHFuslIUO4gy9NQmeauTuxKXZBvoql8mI0jNcO/OiZIXLW6K/dslQQocUkvDuK PQv73FPG+q1xS9P65OXH3QecWOjbGYrnl4iOJWesDxEXGUZaZAoewSc6IcEBJyumMzZWZZOX85tBV zzMY3ts/mgVuKn657yWWb/uCv1jfSupLE9SCQfDzvb59Ja2KVYab3rWpp5buVIRbgBZNV490BLJ7X TILt9zKclegwjoV1w9ZGpmFodmopD2BFa7CMbnGA5+G18RTllkk/qKqGfLTvI2LZ9nxb6x7RXC0Jn +1DoEvcw==; Received: from s3.sipsolutions.net ([2a01:4f8:191:4433::2] helo=sipsolutions.net) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kCg7w-0001UF-UG for hostap@lists.infradead.org; Mon, 31 Aug 2020 09:29:27 +0000 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kCg7j-00DVGB-RI; Mon, 31 Aug 2020 11:29:11 +0200 From: Johannes Berg To: hostap@lists.infradead.org Subject: [PATCH v3 5/9] build: add a common-clean target Date: Mon, 31 Aug 2020 11:28:56 +0200 Message-Id: <1598866005-If0b4368e847a16595115731f5341cfd34714b387@changeid> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200831092900.12492-1-johannes@sipsolutions.net> References: <20200831092900.12492-1-johannes@sipsolutions.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200831_102925_064786_E34EF5E4 X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-1.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Johannes Berg Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Johannes Berg Clean up in a more common fashion as well, initially for ../src/. Also add $(Q) to the clean target in src/ Signed-off-by: Johannes Berg --- eap_example/Makefile | 5 ++--- hostapd/Makefile | 5 ++--- hs20/client/Makefile | 4 ++-- hs20/server/Makefile | 4 ++-- radius_example/Makefile | 5 ++--- src/Makefile | 4 ++-- src/build.rules | 8 ++++++++ tests/Makefile | 5 ++--- wlantest/Makefile | 5 ++--- wpa_supplicant/Makefile | 4 ++-- 10 files changed, 26 insertions(+), 23 deletions(-) diff --git a/eap_example/Makefile b/eap_example/Makefile index e5f3b3471035..ecef3c97662b 100644 --- a/eap_example/Makefile +++ b/eap_example/Makefile @@ -116,8 +116,7 @@ endif eap_example: $(OBJS_ex) $(LIBEAP) $(LDO) $(LDFLAGS) -o eap_example $(OBJS_ex) -L. -leap $(LIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d libeap.a libeap.so $(ALL) +clean: common-clean + rm -f core *~ *.o *.d libeap.a libeap.so -include $(OBJS:%.o=%.d) diff --git a/hostapd/Makefile b/hostapd/Makefile index 5c830fb448b1..2e15c8911483 100644 --- a/hostapd/Makefile +++ b/hostapd/Makefile @@ -1362,9 +1362,8 @@ lcov-html: lcov -c -d .. > lcov.info genhtml lcov.info --output-directory lcov-html -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw +clean: common-clean + rm -f core *~ *.o nt_password_hash hlr_auc_gw rm -f sae_pk_gen rm -f *.d *.gcno *.gcda *.gcov rm -f lcov.info diff --git a/hs20/client/Makefile b/hs20/client/Makefile index 70fb73598dfe..cbb1105e186b 100644 --- a/hs20/client/Makefile +++ b/hs20/client/Makefile @@ -75,8 +75,8 @@ hs20-osu-client: $(OBJS) $(Q)$(LDO) $(LDFLAGS) -o hs20-osu-client $(OBJS) $(LIBS) @$(E) " LD " $@ -clean: - rm -f core *~ *.o *.d hs20-osu-client +clean: common-clean + rm -f core *~ *.o *.d rm -f ../../src/utils/*.o rm -f ../../src/utils/*.d rm -f ../../src/common/*.o diff --git a/hs20/server/Makefile b/hs20/server/Makefile index 9ec7e4491ad4..24b81cd8a28a 100644 --- a/hs20/server/Makefile +++ b/hs20/server/Makefile @@ -36,8 +36,8 @@ OBJS += ../../src/utils/xml_libxml2.o hs20_spp_server: $(OBJS) $(LDO) $(LDFLAGS) -o hs20_spp_server $(OBJS) $(LIBS) -clean: - rm -f core *~ *.o *.d hs20_spp_server +clean: common-clean + rm -f core *~ *.o *.d rm -f ../../src/utils/*.o rm -f ../../src/utils/*.d rm -f ../../src/crypto/*.o diff --git a/radius_example/Makefile b/radius_example/Makefile index 75cb3caeb3dd..3492ac70fc49 100644 --- a/radius_example/Makefile +++ b/radius_example/Makefile @@ -27,8 +27,7 @@ OBJS_ex = radius_example.o radius_example: $(OBJS_ex) $(LIBS) $(LDO) $(LDFLAGS) -o radius_example $(OBJS_ex) $(LIBS) $(LLIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d $(ALL) +clean: common-clean + rm -f core *~ *.o *.d -include $(OBJS:%.o=%.d) diff --git a/src/Makefile b/src/Makefile index c9e84c11de7a..6eb7f2acb5a1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,8 +5,8 @@ all: for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d; done clean: - for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done - rm -f *~ + $(Q)for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d clean; done + $(Q)rm -f *~ install: for d in $(SUBDIRS); do [ -d $$d ] && $(MAKE) -C $$d install; done diff --git a/src/build.rules b/src/build.rules index d6861a671306..e70a0aa2cda7 100644 --- a/src/build.rules +++ b/src/build.rules @@ -3,6 +3,9 @@ all: $(VERIFY) $(ALL) $(EXTRA_TARGETS) # disable built-in rules .SUFFIXES: +ROOTDIR := $(dir $(lastword $(MAKEFILE_LIST))) +ROOTDIR := $(dir $(ROOTDIR:%/=%)) + ifndef CC CC=gcc endif @@ -43,3 +46,8 @@ else $(Q)$(CC) -c -o $@ $(CFLAGS) $< @$(E) " CC " $< endif + +.PHONY: common-clean +common-clean: + $(Q)$(MAKE) -C $(ROOTDIR)/src clean + $(Q)rm -f $(ALL) diff --git a/tests/Makefile b/tests/Makefile index 119ed7a2ae90..4d9f2e0ab8c1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -151,9 +151,8 @@ run-tests: $(ALL) @echo @echo All tests completed successfully. -clean: - $(MAKE) -C ../src clean - rm -f $(ALL) *~ *.o *.d +clean: common-clean + rm -f *~ *.o *.d rm -f test-eapol rm -f test-https rm -f test-json diff --git a/wlantest/Makefile b/wlantest/Makefile index 0324fa54855e..fee80f6f4e2c 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -81,8 +81,7 @@ wlantest_cli: $(OBJS_cli) $(OWN_LIBS) test_vectors: $(TOBJS) $(OWN_LIBS) $(LDO) $(LDFLAGS) -o test_vectors $(TOBJS) $(OWN_LIBS) $(LIBS) -clean: - $(MAKE) -C ../src clean - rm -f core *~ *.o *.d $(ALL) +clean: common-clean + rm -f core *~ *.o *.d -include $(OBJS:%.o=%.d) diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile index 13d938168758..b18755bd7481 100644 --- a/wpa_supplicant/Makefile +++ b/wpa_supplicant/Makefile @@ -2004,11 +2004,11 @@ lcov-html: wpa_supplicant.gcda lcov -c -d .. > lcov.info genhtml lcov.info --output-directory lcov-html -clean: +clean: common-clean $(MAKE) -C ../src clean $(MAKE) -C dbus clean rm -f core *~ *.o *.d *.gcno *.gcda *.gcov - rm -f eap_*.so $(ALL) $(WINALL) eapol_test preauth_test + rm -f eap_*.so $(WINALL) eapol_test preauth_test rm -f wpa_priv rm -f nfc_pw_token rm -f lcov.info