Build script for PuTTY using bob.
[u/mdw/putty] / Buildscr
CommitLineData
1e07e676 1# -*- sh -*-
2# Build script to construct a full distribution directory of PuTTY.
3
4# Set up the arguments for the main make command.
5set Makeargs
6ifneq "$(RELEASE)" "" set Makeargs VER="-DRELEASE=$(RELEASE)"
7ifneq "$(SNAPSHOT)" "" set Makeargs VER="-DSNAPSHOT=$(SNAPSHOT)"
8ifneq "$(XFLAGS)" "" set Makeargs $(makeargs) XFLAGS="$(XFLAGS)"
9ifneq "$(MAKEARGS)" "" set Makeargs $(makeargs) $(MAKEARGS)
10
11# Set up the version string for the docs build.
12set Docmakeargs
13ifneq "$(RELEASE)" "" set Docmakeargs VERSION="PuTTY release $(RELEASE)"
14ifneq "$(SNAPSHOT)" "" set Docmakeaargs VERSION="PuTTY development snapshot $(SNAPSHOT)"
15
16# Set up the version string for the installer.
17set Iversion
18ifneq "$(RELEASE)" "" set Iversion $(RELEASE)
19ifneq "$(SNAPSHOT)" "" set Iversion $(SNAPSHOT)
20# FIXME: what about the static version numbers in putty.iss?
21
22in putty do ./mksrcarc.sh
23in putty do ./mkunxarc.sh $(RELEASE)
24in putty do perl mkfiles.pl
25in putty/doc do make $(Docmakeargs) putty.hlp
26in putty/doc do make $(Docmakeargs) chm
27delegate windows
28 # FIXME: Cygwin alternative?
29 in putty/windows do cmd /c 'vcvars32 & nmake -f Makefile.vc $(Makeargs)'
30 # Ignore exit code from hhc, in favour of seeing whether the .chm
31 # file was created. (Yuck; but hhc appears to return non-zero
32 # exit codes on whim.)
33 in putty/doc do hhc putty.hhp; test -f putty.chm
34 in putty/windows do iscc putty.iss
35 return putty/windows/*.exe
36 return putty/doc/putty.chm
37 return putty/windows/Output/setup.exe
38enddelegate
39in putty/doc do make mostlyclean
40in putty/doc do make $(Docmakeargs)
41in putty/windows do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../doc/putty.chm ../doc/putty.hlp ../doc/putty.cnt
42in putty/doc do zip puttydoc.zip *.html
43
44deliver putty/windows/*.exe x86/$@
45deliver putty/windows/putty.zip x86/$@
46deliver putty/windows/Output/setup.exe x86/putty-$(Iversion)-installer.exe
47deliver putty/doc/puttydoc.zip $@
48deliver putty/doc/putty.chm $@
49deliver putty/doc/putty.hlp $@
50deliver putty/doc/putty.cnt $@
51deliver putty/doc/puttydoc.txt $@
52deliver putty/doc/*.html htmldoc/$@
53deliver putty/putty-src.zip $@
54deliver putty/*.tar.gz $@
55
56# Building the md5sums file is most easily done in the destination
57# directory.
58in-dest . do md5sum `\find * -type f -print` > md5sums