From patchwork Mon Jul 8 17:09:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 2824971 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3EC339F756 for ; Mon, 8 Jul 2013 17:09:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E10252011B for ; Mon, 8 Jul 2013 17:09:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBFE12010F for ; Mon, 8 Jul 2013 17:09:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934Ab3GHRJ2 (ORCPT ); Mon, 8 Jul 2013 13:09:28 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39296 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751582Ab3GHRJ1 (ORCPT ); Mon, 8 Jul 2013 13:09:27 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 63C74A51B7; Mon, 8 Jul 2013 19:09:26 +0200 (CEST) Received: by ds.suse.cz (Postfix, from userid 10065) id B5192DA7AB; Mon, 8 Jul 2013 19:09:25 +0200 (CEST) Date: Mon, 8 Jul 2013 19:09:25 +0200 From: David Sterba To: dsterba@suse.cz, Kusanagi Kouichi , linux-btrfs@vger.kernel.org Subject: Re: [PATCH] btrfs-progs: Fix automatic prerequisite generation Message-ID: <20130708170925.GD18204@twin.jikos.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Kusanagi Kouichi , linux-btrfs@vger.kernel.org References: <20130706082232.1679715C03A@msa104.auone-net.jp> <20130708164607.GC18204@twin.jikos.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130708164607.GC18204@twin.jikos.cz> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jul 08, 2013 at 06:46:07PM +0200, David Sterba wrote: > On Sat, Jul 06, 2013 at 05:22:31PM +0900, Kusanagi Kouichi wrote: > > Some files don't compile because of insufficient prerequisite. > > > > $ make btrfs > > ... > > [CC] btrfs.o > > btrfs.c:24:21: fatal error: version.h: No such file or directory > > #include "version.h" > > ^ > > compilation terminated. > > make: *** [btrfs.o] Error 1 > > Works great, thanks. I've noticed that DEPFLAGS is now unused and > removed it. Two more small things: the files were previously named .something.o.d and now they're something.d . * .gitignore needs to be updated * I'd prefer to keep the suffix .o.d, the leading . has go away due to the macro tricks I'll fold the following patch if you don't mind --- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ *.o *.static.o -.*.o.d +*.o.d version.h version man/*.gz diff --git a/Makefile b/Makefile index 70880bc..849e3fe 100644 --- a/Makefile +++ b/Makefile @@ -76,8 +76,8 @@ else check = true endif -%.d: %.c - $(Q)$(CC) -MM -MG -MF $@ -MT $(@:.d=.o) -MT $(@:.d=.static.o) -MT $@ $(AM_CFLAGS) $(CFLAGS) $< +%.o.d: %.c + $(Q)$(CC) -MM -MG -MF $@ -MT $(@:.o.d=.o) -MT $(@:.o.d=.static.o) -MT $@ $(AM_CFLAGS) $(CFLAGS) $< .c.o: $(Q)$(check) $< @@ -186,7 +186,7 @@ install-man: clean : @echo "Cleaning" - $(Q)rm -f $(progs) cscope.out *.o *.d btrfs-convert btrfs-image btrfs-select-super \ + $(Q)rm -f $(progs) cscope.out *.o *.o.d btrfs-convert btrfs-image btrfs-select-super \ btrfs-zero-log btrfstune dir-test ioctl-test quick-test send-test btrfsck \ btrfs.static mkfs.btrfs.static btrfs-calc-size \ version.h \ @@ -205,5 +205,5 @@ install: $(libs) $(progs) install-man $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir) ifneq ($(MAKECMDGOALS),clean) --include $(objects:.o=.d) $(cmd-objects:.o=.d) $(subst .btrfs,, $(filter-out btrfsck.d, $(progs:=.d))) +-include $(objects:.o=.o.d) $(cmd-objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d))) endif