Yet another case of cp -r -> cp -rP
[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 $(PRIVATE) release/syslinux-$(VERSION)
47         cd release/syslinux-$(VERSION) && $(MAKE) official
48         cd release/syslinux-$(VERSION) && rm -f $(PRIVATE)
49         cd release && tar cvvf - syslinux-$(VERSION) | \
50                 gzip -9 > syslinux-$(VERSION).tar.gz
51         cd release/syslinux-$(VERSION) && \
52                 zip -9r ../syslinux-$(VERSION).zip *
53
54
55 PRERELDIR := release/syslinux-$(VERSION)-pre
56 PRERELNO  := $(shell cat $(PRERELDIR)/.prerel 2>/dev/null || echo 1)
57 PREREL    := syslinux-$(VERSION)-pre$(PRERELNO)
58
59 prerel:
60         cvs tag -F `echo $(PREREL) | sed -e 's/\./_/g'`
61         mkdir -p $(PRERELDIR) $(PRERELDIR)/uu
62         -rm -rf $(PRERELDIR)/$(PREREL)
63         -rm -f $(PRERELDIR)/$(PREREL).*
64         mkdir -p $(PRERELDIR)/$(PREREL)
65         cp -rP $(SOURCES) $(DOCS) $(OTHER) $(PRERELDIR)/$(PREREL)
66         find $(PRERELDIR)/$(PREREL) -name CVS -type d -print0 | \
67                 xargs -0rt rm -rf
68         make -C $(PRERELDIR)/$(PREREL) spotless
69         make -C $(PRERELDIR)/$(PREREL) all DATE=`printf '%s-pre%d          ' $(VERSION) $(PRERELNO) | dd bs=10 count=1 2>/dev/null`
70         make -C $(PRERELDIR)/$(PREREL) dist
71         cd $(PRERELDIR)/$(PREREL) && \
72                 rm -f $(PRIVATE)
73         cd $(PRERELDIR) && tar cvvf - $(PREREL) | \
74                 gzip -9 > $(PREREL).tar.gz 
75         cd $(PRERELDIR) && \
76                 uuencode $(PREREL).tar.gz $(PREREL).tar.gz > uu/$(PREREL).uu
77         cd $(PRERELDIR)/$(PREREL) && \
78                 zip -9r ../$(PREREL).zip *
79         expr $(PRERELNO) + 1 > $(PRERELDIR)/.prerel
80
81 unprerel:
82         expr $(PRERELNO) - 1 > $(PRERELDIR)/.prerel
83         @echo Next release will be syslinux-$(VERSION)-pre`cat $(PRERELDIR)/.prerel`