[squid-dev] [PATCH] Do not update gperf-generated files through make
Amos Jeffries
squid3 at treenet.co.nz
Mon Sep 21 17:26:07 UTC 2015
A slightly more working version. If this works, please feel free to commit.
Amos
-------------- next part --------------
=== modified file 'scripts/source-maintenance.sh'
--- scripts/source-maintenance.sh 2015-08-04 05:32:35 +0000
+++ scripts/source-maintenance.sh 2015-09-21 17:11:56 +0000
@@ -260,27 +260,30 @@
for f in `ls -1 ${ROOT}/doc/manuals/*.po | sort -u`
do
echo " \\"
echo -n " ${f}"
done
echo " "
)| sed s%${ROOT}/doc/manuals/%%g | sed s%\.po%\.lang%g >${ROOT}/doc/manuals/language.list
# Build STUB framework include from current stub_* available
(
sed -e 's%\ \*%##%' -e 's%/\*%##%' -e 's%##/%##%' <scripts/boilerplate.h
echo -n "STUB_SOURCE= tests/STUB.h"
for f in `ls -1 ${ROOT}/src/tests/stub_*.cc | sort -u`
do
echo " \\"
echo -n " ${f}"
done
echo " "
)| sed s%${ROOT}/src/%%g >${ROOT}/src/tests/Stub.list
+# Build the GPERF generated content
+make -C src/http gperf-files
+
# Run formating
echo "" >${ROOT}/doc/debug-sections.tmp
srcformat || exit 1
sort -u <${ROOT}/doc/debug-sections.tmp | sort -n >${ROOT}/doc/debug-sections.tmp2
cat scripts/boilerplate.h ${ROOT}/doc/debug-sections.tmp2 >${ROOT}/doc/debug-sections.txt
rm ${ROOT}/doc/debug-sections.tmp ${ROOT}/doc/debug-sections.tmp2
rm ${ROOT}/boilerplate_fix.sed
=== modified file 'src/http/Makefile.am'
--- src/http/Makefile.am 2015-09-05 18:52:17 +0000
+++ src/http/Makefile.am 2015-09-21 17:19:23 +0000
@@ -4,38 +4,43 @@
## contributions from numerous individuals and organizations.
## Please see the COPYING and CONTRIBUTORS files for details.
##
include $(top_srcdir)/src/Common.am
include $(top_srcdir)/src/TestHeaders.am
SUBDIRS = one
DIST_SUBDIRS = one
noinst_LTLIBRARIES = libsquid-http.la
libsquid_http_la_SOURCES = \
forward.h \
MethodType.cc \
MethodType.h \
ProtocolVersion.h \
RegisteredHeaders.h \
RegisteredHeaders.cc \
RegisteredHeadersHash.cci \
- RegisteredHeadersHash.gperf \
RequestMethod.cc \
RequestMethod.h \
StatusCode.cc \
StatusCode.h \
StatusLine.cc \
StatusLine.h
libsquid_http_la_LIBADD= one/libhttp1.la
MethodType.cc: MethodType.h $(top_srcdir)/src/mk-string-arrays.awk
($(AWK) -f $(top_srcdir)/src/mk-string-arrays.awk sbuf=1 < $(srcdir)/MethodType.h | \
sed -e 's%METHOD_%%' -e 's%_C%-C%' >$@) || ($(RM) -f $@ && exit 1)
-RegisteredHeadersHash.cci: RegisteredHeadersHash.gperf
- gperf --output-file=$@ -m 100000 $<
-
CLEANFILES += MethodType.cc
+
+gperf-files: RegisteredHeadersHash.gperf
+ @if test $(srcdir)/RegisteredHeadersHash.gperf -nt $(srcdir)/RegisteredHeadersHash.cci; then \
+ gperf --output-file=$(srcdir)/RegisteredHeadersHash.cci -m 100000 $(srcdir)/RegisteredHeadersHash.gperf \
+ fi
+
+EXTRA_DIST = RegisteredHeadersHash.gperf
+
+.PHONY: gperf-files
More information about the squid-dev
mailing list