efi/udp.c: Save UDP Port in core_udp_open()
[syslinux/sherbszt.git] / Makefile.private
blob6fa5cbe340ca0c405eaaf15f9b61c1491c332b15
1 ## -*- makefile -*- ------------------------------------------------------
2 ##
3 ##   Copyright 2000-2008 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., 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,
16 # please.
18 .PHONY: official release
20 # These files are removed when tarballs are generated.
21 PRIVATE = Makefile.private mk/devel.mk
23 GIT_DIR ?= .git
24 ABS_GIT_DIR := $(shell cd '$(GIT_DIR)' 2>/dev/null && pwd)
26 -include release/Makefile.secret
28 isolinux.iso: all
29         cp isolinux-debug.bin isolinux-test/isolinux/isolinux.bin
30         mkisofs -v -r -J \
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
35 burn: isolinux.iso
36         cdrecord -v blank=fast isolinux.iso
38 official:
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)
44 release:
45         test -d release
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         find release/syslinux-$(VERSION) \
53                 \( -name '*~' -or -name '#*' -or -name '.git*' \) -type f -print0 | \
54                 xargs -0rt rm -f
55         find release/syslinux-$(VERSION) -name 'tests' -type d -print0 | \
56                 xargs -0rt rm -rf
57         sed -e 's/@@VERSION@@/$(VERSION)/g' -e 's/@@RPMVERSION@@/$(VERSION)/g' \
58                 < release/syslinux-$(VERSION)/syslinux.spec.in \
59                 > release/syslinux-$(VERSION)/syslinux.spec
60         rm -f release/syslinux-$(VERSION)/syslinux.spec.in
61         $(MAKE) -C release/syslinux-$(VERSION) official DATE=`date +%Y-%m-%d`
63         cd release/syslinux-$(VERSION) && rm -rf $(PRIVATE)
64         cd release && tar cvvf - syslinux-$(VERSION) | \
65                 gzip -9 > syslinux-$(VERSION).tar.gz
66         cd release/syslinux-$(VERSION) && \
67                 zip -9r ../syslinux-$(VERSION).zip *
70 PRERELDIR := release/syslinux-$(VERSION)-pre
71 PRERELNO  := $(shell cat $(PRERELDIR)/.prerel 2>/dev/null || echo 1)
72 PREREL    := syslinux-$(VERSION)-pre$(PRERELNO)
73 RPMPREREL := $(shell $(PERL) -e 'printf "%.2f.%d\n", $(VERSION)-0.01, $(PRERELNO);')
75 prerel:
76         test -d release
77         git tag -a -m $(PREREL) -f $(PREREL)
78         -rm -rf $(PRERELDIR)/$(PREREL)
79         -rm -f $(PRERELDIR)/$(PREREL).*
80         mkdir -p $(PRERELDIR)/$(PREREL)
81         git archive --format=tar $(PREREL) | \
82                 tar -x -f - -C $(PRERELDIR)/$(PREREL)
83         find $(PRERELDIR)/$(PREREL) \
84                 \( -name '*~' -or -name '#*' \) -type f -print0 | \
85                 xargs -0rt rm -f
86         find $(PRERELDIR)/$(PREREL) \
87                 -name 'tests' -type d -print0 | \
88                 xargs -0rt rm -rf
89         sed -e 's/@@VERSION@@/$(VERSION)-pre$(PRERELNO)/g' \
90             -e 's/@@RPMVERSION@@/$(RPMPREREL)/g' \
91                 < $(PRERELDIR)/$(PREREL)/syslinux.spec.in \
92                 > $(PRERELDIR)/$(PREREL)/syslinux.spec
93         rm -f $(PRERELDIR)/$(PREREL)/syslinux.spec.in
94         $(MAKE) -C $(PRERELDIR)/$(PREREL) official DATE=`printf '%s-pre%d          ' $(VERSION) $(PRERELNO) | dd bs=10 count=1 2>/dev/null`
95         cd $(PRERELDIR)/$(PREREL) && rm -rf $(PRIVATE)
96         cd $(PRERELDIR) && tar cvvf - $(PREREL) | \
97                 gzip -9 > $(PREREL).tar.gz
98         cd $(PRERELDIR)/$(PREREL) && \
99                 zip -9r ../$(PREREL).zip *
100         expr $(PRERELNO) + 1 > $(PRERELDIR)/.prerel
102 LATEST_PRERELNO := $(shell expr $(PRERELNO) - 1)
103 LATEST_PREREL   := syslinux-$(VERSION)-pre$(LATEST_PRERELNO)
105 unprerel:
106         echo $(LATEST_PRERELNO) > $(PRERELDIR)/.prerel
107         @echo Next release will be $(LATEST_PREREL)