]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
do not ignore build failures in subdirs of iproute2
authorMike Frysinger <vapier@gentoo.org>
Tue, 6 Mar 2007 01:50:49 +0000 (17:50 -0800)
committerStephen Hemminger <shemminger@linux-foundation.org>
Tue, 6 Mar 2007 01:50:49 +0000 (17:50 -0800)
if a file fails to compile in a subdir of iproute2 fails (say "tunnel.c" in
the "ip" dir), the top level makefile does not abort:
 all: Config
    @for i in $(SUBDIRS); \
    do $(MAKE) $(MFLAGS) -C $$i; done

the attached patch inserts a 'set -e' so that if the $(MAKE) fails, the all
target fails as well
-mike

Makefile
tc/m_ipt.c

index 3fc3a15538110dae99fb4a4bab8ef6f6d1bd6aeb..dbcb249a08a596182f39ef2a5d3b96418881e79e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,8 @@ SUBDIRS=lib ip tc misc netem genl
 LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
 
 all: Config
-       @for i in $(SUBDIRS); \
+       @set -e; \
+       for i in $(SUBDIRS); \
        do $(MAKE) $(MFLAGS) -C $$i; done
 
 Config:
index e1f68b33f48cafb7c79f92fd8f7a33b58a864422..3d6533916f6e3a108aca224200123e7a4eca7c81 100644 (file)
 #include <fcntl.h>
 #include <sys/wait.h>
 
-const char *pname = "tc-ipt";
-const char *tname = "mangle";
-const char *pversion = "0.1";
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef IPT_LIB_DIR
-#define IPT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
-#ifndef PROC_SYS_MODPROBE
-#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe"
-#endif
+static const char *pname = "tc-ipt";
+static const char *tname = "mangle";
+static const char *pversion = "0.1";
 
 static const char *ipthooks[] = {
        "NF_IP_PRE_ROUTING",