[r213]: trunk / main.aap Maximize Restore History

Download this file

main.aap    105 lines (96 with data), 3.5 kB

# Following are steps for a new release:
#   aap ChangeLog: update ChangeLog file
#   VERSION, NEWS, INSTALL: to be updated manually
#   aap release: release/vimcdoc-<ver>.tar.gz, release/vimcdoc-<ver>-setup.exe, release/vimcdoc-<ver>-setup-unicode.exe
#   aap -f pdf_maker/main.aap release: release/reference-<ver>.pdf, pdf_maker/user_manual-<ver>.pdf
#   aap -f doc/main.aap allhtml: docs/*.html
#   aap -f www/htdocs/main.aap index.html: www/htdocs/index.html
# Steps to publish:
#   aap -f release/main.aap publish   (release packages and pdf manuals)
#   aap -f doc/main.aap publish       (vimcdoc.sf.net help files)
#   aap -f www/htdocs/main.aap publish (vimcdoc homepage)
# External tools we would need:
#   svn2cl (needed for ChangeLog)
#   nsis, ANSI (standard) and unicode (3.0 alpha needed)
#	wine, if running from non-windows environment
#   latex, latexmk
#   latex packages: CJK, alltt, color, verbatim, hyperref, url

:include $TOPLEVELDIR/common.aap

# ANSI NSIS, available from nsis.sourceforge.net/.
MAKENSIS     = makensis
# Unicode NSIS, available from offical NSIS 3.0a1 
MAKENSIS_UNI = "c:\Program Files\NSIS\makensis"
NSISFILE     = vcd-setup.nsi
NSISFILE_UNI = vcd-setup-unicode.nsi
NSISZIP      = /X"SetCompressor bzip2"
@Vimcdoc_txt = TOPLEVELDIR + '/doc/*.txt'
EXCLUDES     = ''
EXTRA_FILES  = help_cn.vim vimcdoc.vim
#@Vimcdoc_txt = expand2string(glob( Vimcdoc_txt ))

release {virtual}: $RELEASE_NAME
	:print 'Making release files....'
	#Building Linux release.
	@for doc in glob('doc/*.txt'):
		@target_name = os.path.splitext( doc )[0]
		@if not target_name in ['doc/uganda.nsis']:
			:copy $(target_name).txt $RELEASE_NAME/$(target_name).cnx
	extra_files = $EXTRA_FILES
	@for doc in var2list( extra_files ):
		:copy $(doc) $RELEASE_NAME/
	:chmod 755 vimcdoc.sh
	@gentag_cmd = "vim -e -s +'helptags ++t ./doc' +q"
	:sys {force} $gentag_cmd
	:cd -
	:sys tar cf $(TARBALL) $(RELEASE_NAME)
	:sys {force} gzip -9f $(TARBALL) # in windows, gzip return IO error
									 # but the zip file is good .
									 # I don't know why.
	:move $(TARGZ) $(RELEASE_DIR)
	#replace with proper operation to generate a cntags file
	#Building win32 binary
	#@for doc in glob('doc/*.txt'):
	#@target_name = os.path.basename( doc )
	#:cat $doc
	#| :eval re.sub( 'ft=help:norl:', 'ft=help:norl:enc=cp936:', stdin )
	#>! $target_name
	#:move $target_name $RELEASE_NAME/doc
	os = $OSTYPE
	@if os == "mswin":
	:cd -
	:move $RELEASE_NAME/$(VCD)-setup.exe $(RELEASE_DIR)/$(RELEASE_NAME)-setup.exe
	:move $RELEASE_NAME/$(VCD)-setup-unicode.exe $(RELEASE_DIR)/$(RELEASE_NAME)-setup-unicode.exe
	@if os == "posix":
		:sys 'pwd'
	@elif os == "mswin":
		:sys chdir
	:del {r} $RELEASE_NAME

	:mkdir $RELEASE_NAME/doc

ChangeLog: $Vimcdoc_txt 
	:sys svn2cl --strip-prefix=/

	:print Use 'aap clean' to clean up.
	:print Use 'aap release' to generate release packages.
	:print Use 'aap ChangeLog' to update ChangeLog.

	:del {r}{force} *~ *.bak
	:del {r}{force} $RELEASE_NAME
	:execute doc/main.aap clean
	:execute tools/main.aap clean
	:execute pdf_maker/main.aap clean
	:execute release/main.aap clean
	:execute www/htdocs/main.aap clean

# vim:ts=4:noet: