From 838f9718501c15015c3497d7dcbe9d42d05e91b3 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Wed, 2 Jul 2014 10:09:13 +0930 Subject: [PATCH] Fix Makefile.in for OpenWRT build Was not passing $(CFLAGS) $(DEFS) to compile servald_version.c, which provoked a "cc1: note: someone does not honour COPTS correctly, passed 0 times" warning Also was not doing "mkdir -p opts" before the compile, which produced an "opts/version.o: No such file or directory: error --- Makefile.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3cf2f52d..515c59bb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -113,12 +113,13 @@ Makefile: $(wildcard Makefile.in) $(wildcard configure) configure: $(wildcard configure.in) $(warning configure may be out of date, please run autoreconf -f -i) -$(OBJSDIR_TOOLS)/version.o: $(SERVALD_OBJS) version_string.sh $(wildcard VERSION.txt) COPYRIGHT.txt Makefile +$(OBJSDIR_TOOLS)/version.o: $(SERVALD_OBJS) version_servald.c version_string.sh $(wildcard VERSION.txt) COPYRIGHT.txt Makefile @echo CC version_servald.c + @mkdir -p $(dir $@) @$(RM) $(@:.o=.gcno) $(@:.o=.gcda) @V=`./version_string.sh --ignore-untracked` \ && C="`sed -e :a -e N -e '$$!ba' -e 's/[\\\\"]/\\\\&/g' -e 's/\\n/\\\\n/g' COPYRIGHT.txt`" \ - && $(CC) -c version_servald.c -o $@ -DSERVALD_VERSION="\"$$V\"" -DSERVALD_COPYRIGHT="\"$$C\"" + && $(CC) $(CFLAGS) $(DEFS) -c version_servald.c -o $@ -DSERVALD_VERSION="\"$$V\"" -DSERVALD_COPYRIGHT="\"$$C\"" #' <-- fixes vim syntax highlighting