aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-23 18:33:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-23 18:33:53 -0700
commitcf96845bf645266d7ec6e77a92086c8ed7a7803f (patch)
treeaa9a9c30e26ed993a34ff166deecd1c563bca62d /Makefile.in
parent3e555483b30c6f0bd4b348861f694f73e487c134 (diff)
downloadnasm-cf96845bf645266d7ec6e77a92086c8ed7a7803f.tar.gz
nasm-cf96845bf645266d7ec6e77a92086c8ed7a7803f.tar.xz
nasm-cf96845bf645266d7ec6e77a92086c8ed7a7803f.zip
nasm.spec: sync with Fedora spec file, auto-generate Perl depends
Sync up with how the Fedora spec file has evolved. Auto-generate the Perl build dependencies. Add --enable-lto: it makes especally the rdoff files much smaller. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index b377b79c..6764f961 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -348,6 +348,7 @@ clean:
$(RM_F) nasm-*-installer-*.exe
$(RM_F) tags TAGS
$(RM_F) nsis/arch.nsh
+ $(RM_F) perlbreq.si
$(RM_F) $(RDFPROGS) $(RDF2BINLINKS)
distclean: clean
@@ -417,8 +418,16 @@ tar: dist
spec: nasm.spec
-nasm.spec: nasm.spec.in version.sed
- sed -f version.sed < nasm.spec.in > nasm.spec
+ALLPERLSRC := $(shell find $(srcdir) -type f -name '*.p[lh]')
+
+perlbreq.si: $(ALLPERLSRC)
+ sed -n -r -e 's/^use[[:space:]]+([^[:space:];]+).*$$/Build-Requires: perl(\1)/p' $(ALLPERLSRC) | \
+ sed -r -e '/perl\((strict|warnings)\)/d' | \
+ sort | uniq > perlbreq.si || ( rm -f perlbreq.si ; false )
+
+nasm.spec: nasm.spec.in version.sed perlbreq.si
+ sed -f version.sed -e '/@@PERLBUILDREQS@@/r perlbreq.si' \
+ < nasm.spec.in > nasm.spec || ( rm -f nasm.spec ; false )
splint:
splint -weak *.c