summaryrefslogtreecommitdiff
path: root/Makefile.private
blob: 52280961bbdeebb833fffb50ab3f81233a72699f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
## -*- makefile -*- ------------------------------------------------------
##   
##   Copyright 2000-2004 H. Peter Anvin - All Rights Reserved
##
##   This program is free software; you can redistribute it and/or modify
##   it under the terms of the GNU General Public License as published by
##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
##   Boston MA 02111-1307, USA; either version 2 of the License, or
##   (at your option) any later version; incorporated herein by reference.
##
## -----------------------------------------------------------------------
# $Id$

#
# This should only be used by the maintainer to generate official binaries
# for release.  Please do not "make official" and distribute the binaries,
# please.
#
.PHONY: official release

CVS     = cvs -d hpa@terminus.zytor.com:/home/hpa/cvsroot

PRIVATE = Makefile.private .depend */.depend

isolinux.iso: all
	cp isolinux-debug.bin isolinux-test/isolinux/isolinux.bin
	mkisofs -v -r -J \
		-b isolinux/isolinux.bin -c isolinux/boot.cat \
		-no-emul-boot -boot-load-size 4 -boot-info-table \
		-o isolinux.iso isolinux-test

burn: isolinux.iso
	cdrecord -v blank=fast isolinux.iso

official:
	$(MAKE) spotless
	$(MAKE) all DATE=`date +'%Y-%m-%d'`
	$(MAKE) dist

release:
	$(CVS) tag -F `echo syslinux-$(VERSION) | sed -e 's/\./_/g'`
	-rm -rf release/syslinux-$(VERSION)
	-rm -f release/syslinux-$(VERSION).*
	mkdir -p release/syslinux-$(VERSION)
	cd release && $(CVS) export -r `echo syslinux-$(VERSION) | sed -e 's/\./_/g'` -d syslinux-$(VERSION) syslinux
	find release/syslinux-$(VERSION) \
		\( -name '*~' -or -name '#*' \) -type f -print0 | \
		xargs -0rt rm -f
	find release/syslinux-$(VERSION) -name CVS -type d -print0 | \
		xargs -0rt rm -rf
	sed -e 's/@@VERSION@@/$(VERSION)/g' -e 's/@@RPMVERSION@@/$(VERSION)/g' \
		< release/syslinux-$(VERSION)/syslinux.spec.in \
		> release/syslinux-$(VERSION)/syslinux.spec
	rm -f release/syslinux-$(VERSION)/syslinux.spec.in
	$(MAKE) -C release/syslinux-$(VERSION) spotless
	$(MAKE) -C release/syslinux-$(VERSION) depend
	$(MAKE) -C release/syslinux-$(VERSION) official
	cd release/syslinux-$(VERSION) && rm -rf $(PRIVATE)
	cd release && tar cvvf - syslinux-$(VERSION) | \
		gzip -9 > syslinux-$(VERSION).tar.gz
	cd release/syslinux-$(VERSION) && \
		zip -9r ../syslinux-$(VERSION).zip *


PRERELDIR := release/syslinux-$(VERSION)-pre
PRERELNO  := $(shell cat $(PRERELDIR)/.prerel 2>/dev/null || echo 1)
PREREL    := syslinux-$(VERSION)-pre$(PRERELNO)
RPMPREREL := $(shell $(PERL) -e 'printf "%.2f.%d\n", $(VERSION)-0.01, $(PRERELNO);')

prerel:
	$(CVS) tag -F `echo $(PREREL) | sed -e 's/\./_/g'`
	mkdir -p $(PRERELDIR) $(PRERELDIR)/uu
	-rm -rf $(PRERELDIR)/$(PREREL)
	-rm -f $(PRERELDIR)/$(PREREL).*
	mkdir -p $(PRERELDIR)/$(PREREL)
	cd $(PRERELDIR) && $(CVS) export -r `echo $(PREREL) | sed -e 's/\./_/g'` -d $(PREREL) syslinux
	find $(PRERELDIR)/$(PREREL) \
		\( -name '*~' -or -name '#*' \) -type f -print0 | \
		xargs -0rt rm -f
	find $(PRERELDIR)/$(PREREL) -name CVS -type d -print0 | \
		xargs -0rt rm -rf
	sed -e 's/@@VERSION@@/$(VERSION)-pre$(PRERELNO)/g' \
	    -e 's/@@RPMVERSION@@/$(RPMPREREL)/g' \
		< $(PRERELDIR)/$(PREREL)/syslinux.spec.in \
		> $(PRERELDIR)/$(PREREL)/syslinux.spec
	rm -f $(PRERELDIR)/$(PREREL)/syslinux.spec.in
	$(MAKE) -C $(PRERELDIR)/$(PREREL) spotless
	$(MAKE) -C $(PRERELDIR)/$(PREREL) depend
	$(MAKE) -C $(PRERELDIR)/$(PREREL) all DATE=`printf '%s-pre%d          ' $(VERSION) $(PRERELNO) | dd bs=10 count=1 2>/dev/null`
	$(MAKE) -C $(PRERELDIR)/$(PREREL) dist
	cd $(PRERELDIR)/$(PREREL) && rm -rf $(PRIVATE)
	cd $(PRERELDIR) && tar cvvf - $(PREREL) | \
		gzip -9 > $(PREREL).tar.gz 
	cd $(PRERELDIR) && \
		uuencode $(PREREL).tar.gz $(PREREL).tar.gz > uu/$(PREREL).uu
	cd $(PRERELDIR)/$(PREREL) && \
		zip -9r ../$(PREREL).zip *
	expr $(PRERELNO) + 1 > $(PRERELDIR)/.prerel

unprerel:
	expr $(PRERELNO) - 1 > $(PRERELDIR)/.prerel
	@echo Next release will be syslinux-$(VERSION)-pre`cat $(PRERELDIR)/.prerel`