Patchwork build: have `make clean` remove dep files too

login
register
mail settings
Submitter Jan Engelhardt
Date Sept. 10, 2012, 1:10 p.m.
Message ID <1347282605-20781-1-git-send-email-jengelh@inai.de>
Download mbox | patch
Permalink /patch/182889/
State Accepted
Headers show

Comments

Jan Engelhardt - Sept. 10, 2012, 1:10 p.m.
While changing branches, one can hit errors like:

make[2]: ***   CC       libipt_CLUSTERIP.oo
No hay ninguna regla para construir el objetivo
`../include/net/netfilter/nf_nat.h', necesario para
`libipt_DNAT.oo'. Alto.

Pablo thinks dep files should be removed on `make clean`, and I
concur. (JFI, Note that native automake would not clear its ".deps"
directory.) Keep the "distclean: clean" line to keep invocations by
automake from the parent directory working.

Reported-by: Pablo Neira Ayuso <pablo@netfilter.org>
---

This patch is fetchable on
	git://git.inai.de/iptables master

 extensions/GNUmakefile.in |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Pablo Neira - Sept. 10, 2012, 1:44 p.m.
On Mon, Sep 10, 2012 at 03:10:05PM +0200, Jan Engelhardt wrote:
> While changing branches, one can hit errors like:
> 
> make[2]: ***   CC       libipt_CLUSTERIP.oo
> No hay ninguna regla para construir el objetivo
> `../include/net/netfilter/nf_nat.h', necesario para
> `libipt_DNAT.oo'. Alto.
> 
> Pablo thinks dep files should be removed on `make clean`, and I
> concur. (JFI, Note that native automake would not clear its ".deps"
> directory.) Keep the "distclean: clean" line to keep invocations by
> automake from the parent directory working.

As soon as I get it fixed for me is fine, I have applied this patch.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 218dc3a..4a8ff49 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -77,9 +77,9 @@  install: ${targets_install}
 
 clean:
 	rm -f *.o *.oo *.so *.a {matches,targets}[46].man initext.c initext4.c initext6.c;
+	rm -f .*.d .*.dd;
 
 distclean: clean
-	rm -f .*.d .*.dd;
 
 init%.o: init%.c
 	${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;