Skip to content

Commit 0ae7747

Browse files
authored
Merge pull request #436 from timsong-cpp/improve-section-data
Improve section data generation
2 parents f974b2f + 1a00d6a commit 0ae7747

File tree

2 files changed

+10
-44
lines changed

2 files changed

+10
-44
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,21 @@ endef
7272
WG21 := $(HOME)/src/cplusplus
7373
DRAFT := $(WG21)/draft
7474
NET := $(WG21)/networking-ts
75-
filter-annex-f := grep -v '\\newlabel{\(fig\|tab\):' | sed 's/^.*\.aux://' | sed 's/^\\newlabel{\([^}]*\)}{{\([^}]*\)}.*/\1 \2/' | grep -v '^\\' | sed 's/\(Clause\|Annex\) //' | sort
75+
filter-annex-f := grep -v '\\newlabel{\(fig\|tab\|eq\):' | sed 's/^.*\.aux://' | sed 's/^\\newlabel{\([^}]*\)}{{\([^}]*\)}.*/\1 \2/' | grep -v '^\\' | sed 's/\(Clause\|Annex\) //' | sort
76+
# For memoir < 3.8
77+
filter-annex-f-old-memoir := sed 's/\\newlabel{\([^}]*\)}.*TitleReference {\([^}]*\)}.*/\1 \2/' | sed 's/\\newlabel{\([^}]*\)}{{\(Clause\|Annex\) \([^}]*\)}.*/\1 \3/' | grep -v "aux:tab:" | grep -v "aux:fig:" | sed 's/\(.*\).aux://' | grep -v '^\\' | sort
78+
7679
filter-net-ts-annex-f := sed 's/\\newlabel{\([^}]*\)}.*TitleReference {\([^}]*\)}.*/\1 \2/' | sed 's/\\newlabel{\([^}]*\)}.*Clause \([^}]*\)}.*/\1 \2/' | sed 's/\\newlabel{\([^}]*\)}.*Annex \([^}]*\)}.*/\1 \2/' | grep -v "aux:tab:" | grep -v "aux:fig:" | sed 's/\(.*\).aux://' | grep -v '^\\' | sort
7780

7881
# Before running this, rebuild the C++ draft at the desired commit.
7982
# That ensures the .aux files match the content of the relevant draft.
8083
meta-data/annex-f: $(wildcard $(DRAFT)/source/*.aux)
81-
test -d "$(DRAFT)" && grep '^\\newlabel{' $^ | $(filter-annex-f) > $@
84+
test -d "$(DRAFT)"
85+
if grep -q TitleReference $^; then \
86+
grep '^\\newlabel{' $^ | $(filter-annex-f-old-memoir); \
87+
else \
88+
grep '^\\newlabel{' $^ | $(filter-annex-f); \
89+
fi > $@
8290

8391
net-ts-sources := $(wildcard $(NET)/src/*.aux)
8492
# This target has no prerequisites, so it won't complain if the net-ts sources

meta-data/section.data

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,16 +2235,12 @@
22352235
28.7.4 [cuchar.syn]
22362236
28.7.5 [c.mb.wcs]
22372237
29 [numerics]
2238-
29.1 [eq:rand.gencanonical]
22392238
29.1 [numerics.general]
2240-
29.2 [eq:rand.dist.uni.int]
22412239
29.2 [numeric.requirements]
22422240
29.3 [cfenv]
2243-
29.3 [eq:rand.dist.uni.real]
22442241
29.3.1 [cfenv.syn]
22452242
29.3.2 [cfenv.thread]
22462243
29.4 [complex.numbers]
2247-
29.4 [eq:rand.dist.bern.bernoulli]
22482244
29.4.1 [complex.numbers.general]
22492245
29.4.2 [complex.syn]
22502246
29.4.3 [complex]
@@ -2256,7 +2252,6 @@
22562252
29.4.9 [complex.tuple]
22572253
29.4.10 [cmplx.over]
22582254
29.4.11 [complex.literals]
2259-
29.5 [eq:rand.dist.bern.bin]
22602255
29.5 [rand]
22612256
29.5.1 [rand.general]
22622257
29.5.2 [rand.synopsis]
@@ -2311,7 +2306,6 @@
23112306
29.5.9.6.2 [rand.dist.samp.pconst]
23122307
29.5.9.6.3 [rand.dist.samp.plinear]
23132308
29.5.10 [c.math.rand]
2314-
29.6 [eq:rand.dist.bern.geo]
23152309
29.6 [numarray]
23162310
29.6.1 [valarray.syn]
23172311
29.6.2 [template.valarray]
@@ -2359,7 +2353,6 @@
23592353
29.6.9.4 [indirect.array.fill]
23602354
29.6.10 [valarray.range]
23612355
29.7 [c.math]
2362-
29.7 [eq:rand.dist.bern.negbin]
23632356
29.7.1 [cmath.syn]
23642357
29.7.2 [c.math.abs]
23652358
29.7.3 [c.math.hypot3]
@@ -2388,11 +2381,9 @@
23882381
29.7.6.20 [sf.cmath.sph.bessel]
23892382
29.7.6.21 [sf.cmath.sph.legendre]
23902383
29.7.6.22 [sf.cmath.sph.neumann]
2391-
29.8 [eq:rand.dist.pois.poisson]
23922384
29.8 [numbers]
23932385
29.8.1 [numbers.syn]
23942386
29.8.2 [math.constants]
2395-
29.9 [eq:rand.dist.pois.exp]
23962387
29.9 [linalg]
23972388
29.9.1 [linalg.overview]
23982389
29.9.2 [linalg.syn]
@@ -2465,39 +2456,6 @@
24652456
29.9.15.5 [linalg.algs.blas3.rank2k]
24662457
29.9.15.6 [linalg.algs.blas3.trsm]
24672458
29.9.15.7 [linalg.algs.blas3.inplacetrsm]
2468-
29.10 [eq:rand.dist.pois.gamma]
2469-
29.11 [eq:rand.dist.pois.weibull]
2470-
29.12 [eq:rand.dist.pois.extreme]
2471-
29.13 [eq:rand.dist.norm.normal]
2472-
29.14 [eq:rand.dist.norm.lognormal]
2473-
29.15 [eq:rand.dist.norm.chisq]
2474-
29.16 [eq:rand.dist.norm.cauchy]
2475-
29.17 [eq:rand.dist.norm.f]
2476-
29.18 [eq:rand.dist.norm.t]
2477-
29.19 [eq:rand.dist.samp.discrete]
2478-
29.20 [eq:rand.dist.samp.pconst]
2479-
29.21 [eq:rand.dist.samp.plinear]
2480-
29.22 [eq:sf.cmath.assoc.laguerre]
2481-
29.23 [eq:sf.cmath.assoc.legendre]
2482-
29.24 [eq:sf.cmath.beta]
2483-
29.25 [eq:sf.cmath.comp.ellint.1]
2484-
29.26 [eq:sf.cmath.comp.ellint.2]
2485-
29.27 [eq:sf.cmath.comp.ellint.3]
2486-
29.28 [eq:sf.cmath.cyl.bessel.i]
2487-
29.29 [eq:sf.cmath.cyl.bessel.j]
2488-
29.30 [eq:sf.cmath.cyl.bessel.k]
2489-
29.31 [eq:sf.cmath.cyl.neumann]
2490-
29.32 [eq:sf.cmath.ellint.1]
2491-
29.33 [eq:sf.cmath.ellint.2]
2492-
29.34 [eq:sf.cmath.ellint.3]
2493-
29.35 [eq:sf.cmath.expint]
2494-
29.36 [eq:sf.cmath.hermite]
2495-
29.37 [eq:sf.cmath.laguerre]
2496-
29.38 [eq:sf.cmath.legendre]
2497-
29.39 [eq:sf.cmath.riemann.zeta]
2498-
29.40 [eq:sf.cmath.sph.bessel]
2499-
29.41 [eq:sf.cmath.sph.legendre]
2500-
29.42 [eq:sf.cmath.sph.neumann]
25012459
30 [time]
25022460
30.1 [time.general]
25032461
30.2 [time.syn]

0 commit comments

Comments
 (0)