From 4cf97b7d41621d20b94c0e229757efbc1839eaee Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Wed, 11 Dec 2013 15:10:01 +1030 Subject: [PATCH] Do not generate COPYRIGHT.txt in normal build Only when making the "copyright" target. Otherwise Makefile is broken for developers without serval-tools and Python. --- Makefile.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.in b/Makefile.in index ee5f0e8e..ebcbf6ee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -135,14 +135,17 @@ config_test: config_test.o conf_om.o conf_schema.o conf_parse.o str.o strbuf.o s @echo LINK $@ @$(CC) $(CFLAGS) -Wall -o $@ config_test.o conf_om.o conf_schema.o conf_parse.o str.o strbuf.o strbuf_helpers.o mem.o dataformats.o net.o log_util.o $(LDFLAGS) -copyright: COPYRIGHT.txt +copyright: + @if [ -x "$(COPYRIGHT_TOOL)" ]; then \ + echo GENERATE COPYRIGHT.txt; \ + $(COPYRIGHT_TOOL) -o COPYRIGHT.txt condense *.c *.h; \ + else \ + echo 'sp-copyright-tool is not in $$PATH; COPYRIGHT.txt not updated'; \ + fi findPATH = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH))))) COPYRIGHT_TOOL := $(call findPATH,sp-copyright-tool) -COPYRIGHT.txt: *.c *.h $(COPYRIGHT_TOOL) - $(COPYRIGHT_TOOL) -o $@ condense *.c *.h - # This does not build on 64 bit elf platforms as NaCL isn't built with -fPIC # DOC 20120615 libservald.so: $(OBJS) version.o