aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rcynic-ng/Makefile.in12
-rw-r--r--rcynic-ng/defstack.awk16
2 files changed, 15 insertions, 13 deletions
diff --git a/rcynic-ng/Makefile.in b/rcynic-ng/Makefile.in
index 31ebbcb5..9e79103b 100644
--- a/rcynic-ng/Makefile.in
+++ b/rcynic-ng/Makefile.in
@@ -6,8 +6,8 @@ BIN = ${NAME}
SRC = ${NAME}.c
OBJ = ${NAME}.o
+HDR = defasn1.h
GEN = defstack.h
-HDR = defasn1.h ${GEN}
CFLAGS = @CFLAGS@ -Wall -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror-implicit-function-declaration
LDFLAGS = @LDFLAGS@ @LD_STATIC_FLAG@
@@ -26,11 +26,11 @@ clean:
cd static-rsync; ${MAKE} $@
rm -f ${BIN} ${OBJ} ${GEN}
-${BIN}: ${SRC} ${HDR}
+${BIN}: ${SRC} ${HDR} ${GEN}
${CC} ${CFLAGS} -o $@ ${SRC} ${LDFLAGS} ${LIBS}
-defstack.h: defstack.awk
- ${AWK} -f >$@ defstack.awk
+defstack.h: defstack.awk ${SRC} ${HDR}
+ ${AWK} -f >$@ defstack.awk ${SRC} ${HDR}
test: ${BIN}
if test -r rcynic.conf; then ./${BIN} -j 0 && echo && ./show.sh; else echo No rcynic.conf, skipping test; fi
@@ -47,8 +47,8 @@ distclean: clean docclean
tags: TAGS
-TAGS: ${SRC} ${HDR}
- etags ${SRC} ${HDR}
+TAGS: ${SRC} ${HDR} ${GEN}
+ etags ${SRC} ${HDR} ${GEN}
# Doc stuff right now is just internals doc, of interest only to
# programmers. Real doc for rcynic is still the README. This may
diff --git a/rcynic-ng/defstack.awk b/rcynic-ng/defstack.awk
index 66882440..4593cb33 100644
--- a/rcynic-ng/defstack.awk
+++ b/rcynic-ng/defstack.awk
@@ -58,12 +58,14 @@ BEGIN {
print "#ifndef __DEFSTACK_H__";
print "#define __DEFSTACK_H__";
print "";
- define_stack("HOST_MIB_COUNTER");
- define_stack("VALIDATION_STATUS");
- define_stack("FileAndHash");
- define_stack("ROAIPAddress");
- define_stack("ROAIPAddressFamily");
- define_stack("walk_ctx_t");
- define_stack("rsync_ctx_t");
+}
+
+/DECLARE_STACK_OF/ {
+ sub(/^[ \t]+/, "");
+ if (split($0, a, /[() \t]+/) > 1 && a[1] == "DECLARE_STACK_OF")
+ define_stack(a[2]);
+}
+
+END {
print "#endif /* __DEFSTACK_H__ */";
}