summaryrefslogtreecommitdiffstats
path: root/Makefile.rules.in
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-01-16 20:39:20 +0000
committerPatrick McHardy <kaber@trash.net>2014-01-16 20:39:20 +0000
commit807b936bb3d9bb2c924c742a0548337089494968 (patch)
tree61198b487730ad1b434db66ec2f1e002b66d18c2 /Makefile.rules.in
parent0dbced3615ffdbb212ba4f791475a7c65a525309 (diff)
parentbea7aab38f305bb8c2e400d575e6bd0a3c6bbc1f (diff)
Merge remote-tracking branch 'origin/master' into next-3.14
Signed-off-by: Patrick McHardy <kaber@trash.net> Conflicts: include/nftables.h src/main.c
Diffstat (limited to 'Makefile.rules.in')
-rw-r--r--Makefile.rules.in9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile.rules.in b/Makefile.rules.in
index 25988dd7..ae563a54 100644
--- a/Makefile.rules.in
+++ b/Makefile.rules.in
@@ -22,7 +22,14 @@ configure: configure.ac
%.c %.h: %.y $(makedeps)
@echo -e " YACC\t\t$<"
- $(YACC) $(YACCFLAGS) -d -o $@ $<
+ $(YACC) $(YACCFLAGS) --defines=$*.h.tmp -o $@ $<
+ ( \
+ echo "#ifndef __$(*F)_H"; \
+ echo "#define __$(*F)_H"; \
+ cat $*.h.tmp; \
+ echo "#endif /* __$(*F)_H */" \
+ ) > $*.h
+ $(RM) $*.h.tmp
%.c %.h: %.l $(makedeps)
@echo -e " LEX\t\t$<"