NASM 0.98p3.5
[nasm/avx512.git] / makedist.sh
blob5b7abfcc1ba4c388587ff89ec4f8ca9e30ac1215
1 #!/bin/sh
3 MAJORVER=`grep NASM_MAJOR_VER nasm.h | head -1 | cut -f3 -d' '`
4 MINORVER=`grep NASM_MINOR_VER nasm.h | head -1 | cut -f3 -d' '`
5 VERSION="${MAJORVER}.${MINORVER}"
6 DOSVERSION="${MAJORVER}${MINORVER}"
7 NASM_TAR_GZ=dist/nasm-${VERSION}.tar.gz
8 NASM_ZIP=dist/nasm${DOSVERSION}s.zip
9 NASM_DOS_ZIP=dist/nasm${DOSVERSION}.zip
10 NASM_DOC_ZIP=dist/nasm${DOSVERSION}d.zip
12 if [ -d dist ]; then rm -rf dist; fi
13 if [ -d nasm-${VERSION} ]; then rm -rf nasm-${VERSION}; fi
14 if [ ! -d dist ]; then mkdir dist; fi
15 if [ -f dist/nasm.tar.gz ]; then rm dist/nasm.tar.gz; fi
16 mkdir nasm-${VERSION}
17 (cd nasm-${VERSION}; ln -s ../* .;
18 rm -f nasm-${VERSION} dist Checklist GNUmakefile z*)
19 find nasm-${VERSION}/ -follow -name GNUmakefile > tar-exclude
20 find nasm-${VERSION}/ -follow -name RCS >> tar-exclude
21 find nasm-${VERSION}/ -follow -name '*.exe' >> tar-exclude
22 find nasm-${VERSION}/ -follow -name '*.uu' >> tar-exclude
23 find nasm-${VERSION}/ -follow -name '*,v' >> tar-exclude
24 for i in nasm-${VERSION}/doc/{nasmdoc.hpj,nasmdoc.rtf,nasmdoc.texi,Readme};
25 do echo $i; done >> tar-exclude
26 tar chvfX dist/nasm-${VERSION}.tar tar-exclude nasm-${VERSION}
27 rm -f tar-exclude
28 tar tf dist/nasm-${VERSION}.tar | (echo nasm.doc; sed \
29 -e 's:^nasm-[^/]*/::' \
30 -e 's:/$::' \
31 -e '/install-sh/d' \
32 -e '/makedist\.sh/d' \
33 -e '/exasm\.zip/d' \
34 -e '/config/d' \
35 -e '/doc\/.*\.html/d' \
36 -e '/doc\/Readme/d' \
37 -e '/doc\/nasmdoc\.ps/d' \
38 -e '/doc\/nasmdoc\.txt/d' \
39 -e '/doc\/nasmdoc\.rtf/d' \
40 -e '/doc\/nasmdoc\.hpj/d' \
41 -e '/doc\/nasmdoc\.texi/d' \
42 -e '/doc\/nasmdoc\.hlp/d' \
43 -e '/doc\/nasm\.info/d' \
44 ) | sort > zipfiles
45 sed \
46 -e '/^[^\/]*\.\(c\|h\|pl\|bas\|dat\)$/d' \
47 -e '/^doc\(\/.*\)\?/d' \
48 -e '/standard\.mac/d' \
49 -e '/Makefile/d' \
50 -e '/rdoff/d' \
51 < zipfiles > zipfiles.dos
52 gzip -9 dist/nasm-${VERSION}.tar
53 rm -rf nasm-${VERSION}
54 ln -s doc/nasmdoc.src nasm.doc
55 zip -l -k ${NASM_ZIP} `cat zipfiles`
56 zip -k ${NASM_ZIP} *.exe misc/exasm.zip
57 zip -l -k ${NASM_DOS_ZIP} `cat zipfiles.dos`
58 zip -k ${NASM_DOS_ZIP} *.exe misc/exasm.zip
59 rm -f nasm.doc
60 (cd doc; zip -l -k ../${NASM_DOC_ZIP} \
61 Readme \
62 nasmdoc.src rdsrc.pl \
63 nasmdoc.txt \
64 nasmdoc.ps \
65 *.html
66 zip -k ../${NASM_DOC_ZIP} \
67 nasmdoc.hlp \
68 nasm.info)
69 rm -f zipfiles zipfiles.dos
70 echo Distributions complete.