summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-30 16:31:44 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-07-30 16:31:44 -0700
commit2d0a4898b0d49c3c181d67bb8c85d7ceeee76eb5 (patch)
tree4bb9f735d7f6d6d33cc75401f343558b30a8410d
parente520d9c5d22ed5c562b01d5f8fb14702a25236c0 (diff)
downloadnasmbuild-2d0a4898b0d49c3c181d67bb8c85d7ceeee76eb5.tar.gz
nasmbuild-2d0a4898b0d49c3c181d67bb8c85d7ceeee76eb5.tar.xz
nasmbuild-2d0a4898b0d49c3c181d67bb8c85d7ceeee76eb5.zip
Build MacOS X binaries
Add support for building MacOS X binaries
-rwxr-xr-xbuildall.sh28
1 files changed, 26 insertions, 2 deletions
diff --git a/buildall.sh b/buildall.sh
index 48a9ec8..4797b0f 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -32,9 +32,10 @@ build () {
jobs=$((cpus+2))
makej="make -j$jobs"
- rm -rf nasm-* win32 dos os2 rpmbuild html
+ rm -rf nasm-* win32 dos macosx os2 rpmbuild html
mkdir -p rpmbuild/{BUILD,RPMS,SRPMS,SPECS,SOURCES}
+ # --- Generate tarballs ---
(
cd "$gitdir"
if [ -d "$patchdir"/"$version" ]; then
@@ -44,14 +45,18 @@ build () {
fi
./misc/release $version $here
)
+
+ # --- Generate Linux RPMs ---
do32 rpmbuild --target i386 -ta nasm-$version.tar.bz2
rpmbuild --target x86_64 -ta nasm-$version.tar.bz2
+ # --- Expand tarballs (generate combined src+doc working tree) ---
tar xfj nasm-$version.tar.bz2
tar xfj nasm-$version-xdoc.tar.bz2
cp -a nasm-$version/doc/html .
+ # --- Generate Win32 binaries ---
mkdir -p win32
cp -a nasm-$version win32
cd win32/nasm-$version
@@ -65,6 +70,7 @@ build () {
mv nasm-$version-installer.exe ../..
cd ../..
+ # --- Generate DOS binaries ---
mkdir -p dos
cp -a nasm-$version dos
cd dos/nasm-$version
@@ -82,6 +88,20 @@ build () {
zip -9Drg ../nasm-$version-dos-upx.zip nasm-$version -i \*.exe
cd ..
+ # --- Generate MacOS X binaries ---
+ mkdir -p macosx/nasm-$version
+ cp -a nasm-$version macosx/nasm-$version.work
+ cd macosx/nasm-$version.work
+ CC='darwinx-gcc' LDFLAGS='-s' ./configure --host=i686-apple-darwin9
+ $makej CC='darwinx-gcc -arch i386 -arch ppc'
+ mv LICENSE README doc/nasmdoc.pdf ../nasm-$version/
+ make install INSTALLROOT=`pwd`/../nasm-$version bindir= mandir=
+ make install_rdf INSTALLROOT=`pwd`/../nasm-$version bindir= mandir=
+ cd ..
+ zip -9Dr ../nasm-$version-macosx.zip nasm-$version
+ cd ..
+
+ # --- Generate OS/2 binaries ---
mkdir -p os2
cp -a nasm-$version os2
cd os2/nasm-$version
@@ -91,11 +111,13 @@ build () {
zip -9Drg ../nasm-$version-os2.zip nasm-$version -i \*.exe
cd ..
+ # --- Clean up ---
rm -rf "$gitdir" nasm-$version
+ # --- Publish resulting output files ---
mkdir -p "$outdir"
echo "$rev" > "$outdir"/git.id
- for os in dos win32 os2 linux; do
+ for os in linux win32 dos macosx os2; do
mkdir -p "$outdir"/"$os"
done
@@ -107,6 +129,8 @@ build () {
mv -f nasm-${version}-installer.exe "$outdir"/win32/
# DOS
mv -f nasm-${version}-dos.zip nasm-${version}-dos-upx.zip "$outdir"/dos/
+ # MacOS X
+ mv -f nasm-${version}-macosx.zip "$outdir"/macosx/
# OS/2
mv -f nasm-${version}-os2.zip "$outdir"/os2/
# Linux (RPMS)