B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Sven Eckelmann <sven@narfation.org>
Subject: [B.A.T.M.A.N.] [PATCH 1/4] alfred: Don't fail rebuild when header is removed
Date: Sat, 21 Sep 2013 16:31:14 +0200	[thread overview]
Message-ID: <1379773877-6299-1-git-send-email-sven@narfation.org> (raw)

The *.d depends files for make just list the files used when building an object
file. Removing a file listed in such a dependency file causes make to search
for a way to recreate it. This usually cannot work because these files aren't
autogenerated.

The gcc option -MP can be used to generate empty rule for these files. Removing
a file in a dependency list will then execute this empty rule and continue with
the execution of the creation of the object file. This compilation process will
then automatically correct the dependency file.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 Makefile     | 2 +-
 vis/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index aeee2e8..ec9dc11 100644
--- a/Makefile
+++ b/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = alfred
 OBJ = main.o server.o client.o netsock.o send.o recv.o hash.o unix_sock.o util.o debugfs.o batadv_query.o
 
 # alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
 LDLIBS += -lrt
 
 # disable verbose output
diff --git a/vis/Makefile b/vis/Makefile
index 8585f9a..9bf72c9 100644
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -23,7 +23,7 @@ BINARY_NAME = vis
 OBJ = vis.o debugfs.o
 
 # alfred flags and options
-CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD
+CFLAGS += -pedantic -Wall -W -std=gnu99 -fno-strict-aliasing -MD -MP
 LDLIBS += -lrt
 
 # disable verbose output
-- 
1.8.4.rc3


             reply	other threads:[~2013-09-21 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-21 14:31 Sven Eckelmann [this message]
2013-09-21 14:31 ` [B.A.T.M.A.N.] [PATCH 2/4] alfred: Fix version number for git builds of vis Sven Eckelmann
2013-09-21 14:31 ` [B.A.T.M.A.N.] [PATCH 3/4] alfred: Rename vis to batadv-vis Sven Eckelmann
2013-09-21 14:31 ` [B.A.T.M.A.N.] [PATCH 4/4] alfred: Add manpage stubs Sven Eckelmann
2013-09-29 20:53 ` [B.A.T.M.A.N.] [PATCH 1/4] alfred: Don't fail rebuild when header is removed Simon Wunderlich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379773877-6299-1-git-send-email-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox