[Dnsmasq-discuss] [PATCH] Let the Makefile be aware of changes in COPTS varaible.
Simon Kelley
simon at thekelleys.org.uk
Sat Jan 3 16:39:42 GMT 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
That's nice: fixes something that bites me regularly.
Patch tweaked to suit my tastes, and fixed up (Need to delete .conf_*
when making a new one, md5sum dnsmasq.h not config.h)
Please shout of I broke anything.
Applied.
Cheers,
Simon.
On 31/12/14 10:23, Yousong Zhou wrote:
> Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com> --- .gitignore
> | 2 +- Makefile | 10 +++++++--- 2 files changed, 8
> insertions(+), 4 deletions(-)
>
> diff --git a/.gitignore b/.gitignore index fcdbcbd..23f1148 100644
> --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ src/*.mo
> src/dnsmasq.pot src/dnsmasq src/dnsmasq_baseline -src/.configured
> +src/.copts_* contrib/wrt/dhcp_lease_time contrib/wrt/dhcp_release
> debian/base/ diff --git a/Makefile b/Makefile index
> c340f1c..c00eee6 100644 --- a/Makefile +++ b/Makefile @@ -74,6
> +74,10 @@ objs = cache.o rfc1035.o util.o option.o forward.o
> network.o \ hdrs = dnsmasq.h config.h dhcp-protocol.h
> dhcp6-protocol.h \ dns-protocol.h radv-protocol.h ip6addr.h
>
> +COPTS_CONF = .copts_$(shell $(CC) -DDNSMASQ_COMPILE_OPTS $(COPTS)
> -E $(top)/$(SRC)/config.h | \ + ( md5sum 2>/dev/null || md5 ) |
> cut -f 1 -d ' ') +COPTS_CONF_WILD = .copts_* + all : $(BUILDDIR)
> @cd $(BUILDDIR) && $(MAKE) \ top="$(top)" \ @@ -83,7 +87,7 @@ all :
> $(BUILDDIR)
>
> mostly_clean : rm -f $(BUILDDIR)/*.mo $(BUILDDIR)/*.pot - rm -f
> $(BUILDDIR)/.configured $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a
> $(BUILDDIR)/dnsmasq + rm -f $(BUILDDIR)/$(COPTS_CONF_WILD)
> $(BUILDDIR)/*.o $(BUILDDIR)/dnsmasq.a $(BUILDDIR)/dnsmasq
>
> clean : mostly_clean rm -f $(BUILDDIR)/dnsmasq_baseline @@ -139,7
> +143,7 @@ bloatcheck : $(BUILDDIR)/dnsmasq_baseline mostly_clean
> all
>
> # rules below are targets in recusive makes with cwd=$(BUILDDIR)
>
> -.configured: $(hdrs) +$(COPTS_CONF): $(hdrs) @rm -f *.o @touch $@
>
> @@ -149,7 +153,7 @@ $(objs:.o=.c) $(hdrs): .c.o: $(CC) $(CFLAGS)
> $(COPTS) $(i18n) $(build_cflags) $(RPM_OPT_FLAGS) -c $<
>
> -dnsmasq : .configured $(hdrs) $(objs) +dnsmasq : $(COPTS_CONF)
> $(hdrs) $(objs) $(CC) $(LDFLAGS) -o $@ $(objs) $(build_libs)
> $(LIBS)
>
> dnsmasq.pot : $(objs:.o=.c) $(hdrs)
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJUqBtOAAoJEBXN2mrhkTWiYgUP/RM7fN6+W3R42MvKzfRQJ/pS
IwV85yNc/5rDhojGmLmUBOg+DRXkT/IihkIEXPfRmlkAhUb8tfoAmoWe00iupknr
EQcIK6QQrIirXjq7uQhAHKHNhflJwnuwyEYaSWqcb0TyouX43F9KTMfYjCs7nkdW
vg+4KFzCMMX6sEj19ipx7zvElfNGCxWVkzjtmvFNgKIM53qeyK8iHmyU8P0jvWf7
yfJ2Goi10UDObksBeTL/dvuTGRCz1yb17aM+06X9mmAdwnNTTNvuEovRenKz/hSI
D7tj/KY4/tw1JueotybZ5bNA8h7BehqJCYkM97ZWJGMwj8aCmdixSVK79Squ1sfv
tk85OIdWStqf+4JZjMkYyJT/AZ+pBBIkfVzYjv+klCRpGFTPkZk6eCQS1Y/MWfPP
86IVaf3v4Yfuu4wnA5wxhlXMAHf+p8RuPc/2wMxR7JLdmjz2a2qlonONgpPyJvFR
CMjEwBhGSW3zgduYFw1M3LyHWCyNs57+4LOUI9epyQ6Fg3bdTqekJIGFlL6hFzPs
1LxislRx71Oe20y0QQpEcqz4R21MVgK4FvyP9m80YLYEtNqLhKkiQnSZ8KpBzF5y
dwgHz2wGdZjAp0XQIBppkBEHJ7TwhOvkvDKRbcm5FH/xCi6Tv0gXAU9wPNZGw1nF
aynkJSw3gB4VFA/IliiZ
=2Xs4
-----END PGP SIGNATURE-----
More information about the Dnsmasq-discuss
mailing list