1 ## -*- makefile -*- ------------------------------------------------------
3 ## Copyright 2000-2008 H. Peter Anvin - All Rights Reserved
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., 53 Temple Place Ste 330,
8 ## Boston MA 02111-1307, USA; either version 2 of the License, or
9 ## (at your option) any later version; incorporated herein by reference.
11 ## -----------------------------------------------------------------------
14 # This should only be used by the maintainer to generate official binaries
15 # for release. Please do not "make official" and distribute the binaries,
18 .PHONY: official release
20 # These files are removed when tarballs are generated.
21 PRIVATE = Makefile.private mk/devel.mk
24 ABS_GIT_DIR := $(shell cd '$(GIT_DIR)' 2>/dev/null && pwd)
26 -include release/Makefile.secret
29 cp isolinux-debug.bin isolinux-test/isolinux/isolinux.bin
31 -b isolinux/isolinux.bin -c isolinux/boot.cat \
32 -no-emul-boot -boot-load-size 4 -boot-info-table \
33 -o isolinux.iso isolinux-test
36 cdrecord -v blank=fast isolinux.iso
39 $(MAKE) spotless CC='$(CC) -m32' SRC=$(topdir) OBJ=$(CURDIR)
40 $(MAKE) all CC='$(CC) -m32' SRC=$(topdir) OBJ=$(CURDIR)
41 $(MAKE) strip CC='$(CC) -m32' SRC=$(topdir) OBJ=$(CURDIR)
42 $(MAKE) dist CC='$(CC) -m32' SRC=$(topdir) OBJ=$(CURDIR)
46 git tag -a -m syslinux-$(VERSION) -f syslinux-$(VERSION)
47 -rm -rf release/syslinux-$(VERSION)
48 -rm -f release/syslinux-$(VERSION).*
49 mkdir -p release/syslinux-$(VERSION)
50 git archive --format=tar syslinux-$(VERSION) | \
51 tar -x -f - -C release/syslinux-$(VERSION)
52 ( cd gnu-efi && git archive --format=tar HEAD ) | \
53 tar -x -f - -C release/syslinux-$(VERSION)/gnu-efi
54 find release/syslinux-$(VERSION) \
55 \( -name '*~' -or -name '#*' -or -name '.git*' \) -type f -print0 | \
57 find release/syslinux-$(VERSION) -name 'tests' -type d -print0 | \
59 sed -e 's/@@VERSION@@/$(VERSION)/g' -e 's/@@RPMVERSION@@/$(VERSION)/g' \
60 < release/syslinux-$(VERSION)/syslinux.spec.in \
61 > release/syslinux-$(VERSION)/syslinux.spec
62 rm -f release/syslinux-$(VERSION)/syslinux.spec.in
63 $(MAKE) -C release/syslinux-$(VERSION) official DATE=`date +%Y-%m-%d`
65 cd release/syslinux-$(VERSION) && rm -rf $(PRIVATE)
66 cd release && tar cvvf syslinux-$(VERSION).tar syslinux-$(VERSION)
67 cd release && xz -9ke syslinux-$(VERSION).tar
68 cd release && gzip -9 syslinux-$(VERSION).tar
69 cd release/syslinux-$(VERSION) && zip -9r ../syslinux-$(VERSION).zip *
72 PRERELDIR := release/syslinux-$(VERSION)-pre
73 PRERELNO := $(shell cat $(PRERELDIR)/.prerel 2>/dev/null || echo 1)
74 PREREL := syslinux-$(VERSION)-pre$(PRERELNO)
75 RPMPREREL := $(shell $(PERL) -e 'printf "%.2f.%d\n", $(VERSION)-0.01, $(PRERELNO);')
79 git tag -a -m $(PREREL) -f $(PREREL)
80 -rm -rf $(PRERELDIR)/$(PREREL)
81 -rm -f $(PRERELDIR)/$(PREREL).*
82 mkdir -p $(PRERELDIR)/$(PREREL)
83 git archive --format=tar $(PREREL) | \
84 tar -x -f - -C $(PRERELDIR)/$(PREREL)
85 ( cd gnu-efi && git archive --format=tar HEAD ) | \
86 tar -x -f - -C $(PRERELDIR)/$(PREREL)/gnu-efi
87 find $(PRERELDIR)/$(PREREL) \
88 \( -name '*~' -or -name '#*' \) -type f -print0 | \
90 find $(PRERELDIR)/$(PREREL) \
91 -name 'tests' -type d -print0 | \
93 sed -e 's/@@VERSION@@/$(VERSION)-pre$(PRERELNO)/g' \
94 -e 's/@@RPMVERSION@@/$(RPMPREREL)/g' \
95 < $(PRERELDIR)/$(PREREL)/syslinux.spec.in \
96 > $(PRERELDIR)/$(PREREL)/syslinux.spec
97 rm -f $(PRERELDIR)/$(PREREL)/syslinux.spec.in
98 $(MAKE) -C $(PRERELDIR)/$(PREREL) official DATE=`printf '%s-pre%d ' $(VERSION) $(PRERELNO) | dd bs=10 count=1 2>/dev/null`
99 cd $(PRERELDIR)/$(PREREL) && rm -rf $(PRIVATE)
100 cd $(PRERELDIR) && tar cvvf $(PREREL).tar $(PREREL)
101 cd $(PRERELDIR) && xz -9ke $(PREREL).tar
102 cd $(PRERELDIR) && gzip -9 $(PREREL).tar
103 cd $(PRERELDIR)/$(PREREL) && zip -9r ../$(PREREL).zip *
104 expr $(PRERELNO) + 1 > $(PRERELDIR)/.prerel
106 LATEST_PRERELNO := $(shell expr $(PRERELNO) - 1)
107 LATEST_PREREL := syslinux-$(VERSION)-pre$(LATEST_PRERELNO)
110 echo $(LATEST_PRERELNO) > $(PRERELDIR)/.prerel
111 @echo Next release will be $(LATEST_PREREL)