spec generation: try to distinguish use pragmas from modules

Assume module names (for "use") always start with a capital letter,
and that anything that doesn't is a pragma.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin 2024-04-12 14:05:32 -07:00
parent 03469f5bd0
commit 25f701e689

View File

@ -477,8 +477,8 @@ spec: nasm.spec
ALLPERLSRC := $(shell find $(srcdir) -type f -name '*.p[lh]')
perlbreq.si: $(ALLPERLSRC)
sed -n -r -e 's/^[[:space:]]*use[[:space:]]+([^[:space:];]+).*$$/BuildRequires: perl(\1)/p' $(ALLPERLSRC) | \
sed -r -e '/perl\((strict|warnings|Win32.*)\)/d' | \
sed -n -r -e 's/^[[:space:]]*use[[:space:]]+([[:upper:]][^[:space:];]*).*$$/BuildRequires: perl(\1)/p' $(ALLPERLSRC) | \
sed -r -e '/perl\((Win32.*)\)/d' | \
sort | uniq > perlbreq.si
nasm.spec: nasm.spec.in nasm.spec.sed version.sed perlbreq.si