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.
This commit is contained in:
Andrew Bettison 2013-12-11 15:10:01 +10:30
parent e921404686
commit 4cf97b7d41

View File

@ -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