Merge in changes from SYSLINUX 1.75
[profile/ivi/syslinux.git] / Makefile.private
1 ## -*- makefile -*- ------------------------------------------------------
2 ##   
3 ##   Copyright 2000-2002 H. Peter Anvin - All Rights Reserved
4 ##
5 ##   This program is free software; you can redistribute it and/or modify
6 ##   it under the terms of the GNU General Public License as published by
7 ##   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
8 ##   USA; either version 2 of the License, or (at your option) any later
9 ##   version; incorporated herein by reference.
10 ##
11 ## -----------------------------------------------------------------------
12 # $Id$
13
14 #
15 # This should only be used by the maintainer to generate official binaries
16 # for release.  Please do not "make official" and distribute the binaries,
17 # please.
18 #
19 .PHONY: official release
20
21 PRIVATE = Makefile.private .depend memdisk/.depend
22
23 isolinux.iso: all
24         cp isolinux-debug.bin isolinux-test/isolinux/isolinux.bin
25         mkisofs -v -r -J \
26                 -b isolinux/isolinux.bin -c isolinux/boot.cat \
27                 -no-emul-boot -boot-load-size 4 -boot-info-table \
28                 -o isolinux.iso isolinux-test
29
30 burn: isolinux.iso
31         cdrecord -v blank=fast isolinux.iso
32
33 official:
34         $(MAKE) spotless
35         $(MAKE) all DATE=`date +'%Y-%m-%d'`
36         $(MAKE) dist
37
38 release:
39         cvs tag -F `echo syslinux-$(VERSION) | sed -e 's/\./_/g'`
40         -rm -rf release/syslinux-$(VERSION)
41         -rm -f release/syslinux-$(VERSION).*
42         mkdir -p release/syslinux-$(VERSION)
43         cp -rP $(SOURCES) $(DOCS) $(OTHER) release/syslinux-$(VERSION)
44         find release/syslinux-$(VERSION) -name CVS -type d -print0 | \
45                 xargs -0rt rm -rf
46         ln -f $(PRIVATE) release/syslinux-$(VERSION)
47         cd release/syslinux-$(VERSION) && $(MAKE) depend
48         cd release/syslinux-$(VERSION) && $(MAKE) official
49         cd release/syslinux-$(VERSION) && rm -f $(PRIVATE)
50         cd release && tar cvvf - syslinux-$(VERSION) | \
51                 gzip -9 > syslinux-$(VERSION).tar.gz
52         cd release/syslinux-$(VERSION) && \
53                 zip -9r ../syslinux-$(VERSION).zip *
54
55
56 PRERELDIR := release/syslinux-$(VERSION)-pre
57 PRERELNO  := $(shell cat $(PRERELDIR)/.prerel 2>/dev/null || echo 1)
58 PREREL    := syslinux-$(VERSION)-pre$(PRERELNO)
59
60 prerel:
61         cvs tag -F `echo $(PREREL) | sed -e 's/\./_/g'`
62         mkdir -p $(PRERELDIR) $(PRERELDIR)/uu
63         -rm -rf $(PRERELDIR)/$(PREREL)
64         -rm -f $(PRERELDIR)/$(PREREL).*
65         mkdir -p $(PRERELDIR)/$(PREREL)
66         cp -rP $(SOURCES) $(DOCS) $(OTHER) $(PRERELDIR)/$(PREREL)
67         find $(PRERELDIR)/$(PREREL) -name CVS -type d -print0 | \
68                 xargs -0rt rm -rf
69         make -C $(PRERELDIR)/$(PREREL) spotless
70         make -C $(PRERELDIR)/$(PREREL) all DATE=`printf '%s-pre%d          ' $(VERSION) $(PRERELNO) | dd bs=10 count=1 2>/dev/null`
71         make -C $(PRERELDIR)/$(PREREL) dist
72         cd $(PRERELDIR)/$(PREREL) && \
73                 rm -f $(PRIVATE)
74         cd $(PRERELDIR) && tar cvvf - $(PREREL) | \
75                 gzip -9 > $(PREREL).tar.gz 
76         cd $(PRERELDIR) && \
77                 uuencode $(PREREL).tar.gz $(PREREL).tar.gz > uu/$(PREREL).uu
78         cd $(PRERELDIR)/$(PREREL) && \
79                 zip -9r ../$(PREREL).zip *
80         expr $(PRERELNO) + 1 > $(PRERELDIR)/.prerel
81
82 unprerel:
83         expr $(PRERELNO) - 1 > $(PRERELDIR)/.prerel
84         @echo Next release will be syslinux-$(VERSION)-pre`cat $(PRERELDIR)/.prerel`