Kaydet (Commit) 89bdfccc authored tarafından Stephan Bergmann's avatar Stephan Bergmann

bin/gen-boost-headers: Don't stumble over "boost" in pathname

...like

  workdir/UnpackedTarball/liborcus/m4/boost.m4:#include <boost/version.hpp>

which would then be mis-parsed by

  grep -o '\bboost.*\.\(h\|hpp\|ipp\)'

to a HEADER of

  boost.m4:#include <boost/version.hpp

instead of just

  boost/version.hpp

(-h is a non-standard GNU grep extension, but so is the already used -r.  An
alternative fix would be to replace the later grep -o with something like

  grep -o '\bboost[^#]*\.\(h\|hpp\|ipp\)'

instead.)

Change-Id: I0b41ed520b2fed70e8982abc0e84a34804c02549
üst aebdeb65
...@@ -21,12 +21,12 @@ mkdir ${GENDIR} ...@@ -21,12 +21,12 @@ mkdir ${GENDIR}
# note: clucene contains a copy of half of boost, so ignore it too # note: clucene contains a copy of half of boost, so ignore it too
# note: firebird contains a copy of half of boost, so ignore it too # note: firebird contains a copy of half of boost, so ignore it too
cat <(cd ${SRCDIR} && git grep '^# *include') \ cat <(cd ${SRCDIR} && git grep -h '^# *include') \
<(find ${WORKDIR}/UnpackedTarball/ -mindepth 1 -maxdepth 1 -type d \ <(find ${WORKDIR}/UnpackedTarball/ -mindepth 1 -maxdepth 1 -type d \
| grep -v boost \ | grep -v boost \
| grep -v clucene \ | grep -v clucene \
| grep -v firebird \ | grep -v firebird \
| xargs grep -r '^# *include') \ | xargs grep -hr '^# *include') \
| grep -o '\bboost.*\.\(h\|hpp\|ipp\)' \ | grep -o '\bboost.*\.\(h\|hpp\|ipp\)' \
| sort | uniq \ | sort | uniq \
| while read -r HEADER; do | while read -r HEADER; do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment