1 | # $Id: Maintenance.kmk 2019 2008-11-02 00:21:05Z bird $
|
---|
2 | ## @file
|
---|
3 | # Maintenance Makefile for kBuild.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (c) 2008 knut st. osmundsen <[email protected]>
|
---|
8 | #
|
---|
9 | # This file is part of kBuild.
|
---|
10 | #
|
---|
11 | # kBuild is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 3 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # kBuild is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with kBuild. If not, see <http://www.gnu.org/licenses/>
|
---|
23 | #
|
---|
24 | #
|
---|
25 |
|
---|
26 | DEPTH = .
|
---|
27 | include $(PATH_KBUILD)/header.kmk
|
---|
28 |
|
---|
29 | RMTREE = $(ECHO) todo: $(RM) -Rf
|
---|
30 | RMTREE = rm -Rf
|
---|
31 | SVN = svn
|
---|
32 | TAR = tar
|
---|
33 | GZIP = gzip
|
---|
34 |
|
---|
35 | ifeq ($(strip $(KBUILD_SVN_INFO_KMK)),)
|
---|
36 | $(error wtf? KBUILD_SVN_INFO_KMK is empty!)
|
---|
37 | endif
|
---|
38 |
|
---|
39 | #
|
---|
40 | # Creates the 'all' tarballs.
|
---|
41 | #
|
---|
42 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz: | $$(dir $$@)
|
---|
43 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz
|
---|
44 | $(RMTREE) $(PATH_TARGET)/all/
|
---|
45 | $(MKDIR) -p $(PATH_TARGET)/all/
|
---|
46 | $(SVN) export . $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/
|
---|
47 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) \
|
---|
48 | $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/SvnInfo.kmk
|
---|
49 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar \
|
---|
50 | -C $(PATH_TARGET)/all/ kBuild-$(KBUILD_VERSION)/
|
---|
51 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar
|
---|
52 | $(RMTREE) $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/
|
---|
53 |
|
---|
54 | OTHER_CLEAN += \
|
---|
55 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar \
|
---|
56 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz
|
---|
57 |
|
---|
58 |
|
---|
59 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz: | $$(dir $$@)
|
---|
60 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz
|
---|
61 | $(RMTREE) $(PATH_TARGET)/night-all/
|
---|
62 | $(MKDIR) -p $(PATH_TARGET)/night-all/
|
---|
63 | $(SVN) export . $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/
|
---|
64 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) \
|
---|
65 | $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/SvnInfo.kmk
|
---|
66 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar \
|
---|
67 | -C $(PATH_TARGET)/night-all/ kBuild-$(KBUILD_SVN_REV)/
|
---|
68 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar
|
---|
69 | $(RMTREE) $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/
|
---|
70 |
|
---|
71 | OTHER_CLEAN += \
|
---|
72 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar \
|
---|
73 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz
|
---|
74 |
|
---|
75 |
|
---|
76 | #
|
---|
77 | # Creates the source tarballs.
|
---|
78 | #
|
---|
79 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz: | $$(dir $$@)
|
---|
80 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
81 | $(RMTREE) $(PATH_TARGET)/src/
|
---|
82 | $(MKDIR) -p $(PATH_TARGET)/src/
|
---|
83 | $(SVN) export . $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/
|
---|
84 | $(RMTREE) $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/kBuild/bin
|
---|
85 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) \
|
---|
86 | $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/SvnInfo.kmk
|
---|
87 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \
|
---|
88 | -C $(PATH_TARGET)/src/ kBuild-$(KBUILD_VERSION)/
|
---|
89 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar
|
---|
90 | $(RMTREE) $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/
|
---|
91 |
|
---|
92 | OTHER_CLEAN += \
|
---|
93 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \
|
---|
94 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
95 |
|
---|
96 |
|
---|
97 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz: | $$(dir $$@)
|
---|
98 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
99 | $(RMTREE) $(PATH_TARGET)/night-src/
|
---|
100 | $(MKDIR) -p $(PATH_TARGET)/night-src/
|
---|
101 | $(SVN) export . $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/
|
---|
102 | $(RMTREE) $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/kBuild/bin
|
---|
103 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) \
|
---|
104 | $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/SvnInfo.kmk
|
---|
105 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \
|
---|
106 | -C $(PATH_TARGET)/night-src/ kBuild-$(KBUILD_SVN_REV)/
|
---|
107 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar
|
---|
108 | $(RMTREE) $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/
|
---|
109 |
|
---|
110 | OTHER_CLEAN += \
|
---|
111 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \
|
---|
112 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
113 |
|
---|
114 | #
|
---|
115 | # Creates the binary tarballs.
|
---|
116 | #
|
---|
117 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz: | $$(dir $$@)
|
---|
118 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
119 | $(RMTREE) $(PATH_TARGET)/bin/
|
---|
120 | $(MKDIR) -p $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/
|
---|
121 | $(SVN) export kBuild/ $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/kBuild/
|
---|
122 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \
|
---|
123 | -C $(PATH_TARGET)/bin/ kBuild-$(KBUILD_VERSION)/
|
---|
124 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar
|
---|
125 | $(RMTREE) $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/
|
---|
126 |
|
---|
127 | OTHER_CLEAN += \
|
---|
128 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \
|
---|
129 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
130 |
|
---|
131 |
|
---|
132 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz: | $$(dir $$@)
|
---|
133 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
134 | $(RMTREE) $(PATH_TARGET)/night-bin/
|
---|
135 | $(MKDIR) -p $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/
|
---|
136 | $(SVN) export kBuild/ $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/kBuild/
|
---|
137 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \
|
---|
138 | -C $(PATH_TARGET)/night-bin/ kBuild-$(KBUILD_SVN_REV)/
|
---|
139 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar
|
---|
140 | $(RMTREE) $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/
|
---|
141 |
|
---|
142 | OTHER_CLEAN += \
|
---|
143 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \
|
---|
144 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
145 |
|
---|
146 |
|
---|
147 | #
|
---|
148 | # Aliases
|
---|
149 | #
|
---|
150 | tarballs: \
|
---|
151 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
152 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
153 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
154 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
155 |
|
---|
156 | release: \
|
---|
157 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
158 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
159 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz
|
---|
160 |
|
---|
161 | nightly: \
|
---|
162 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
163 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz \
|
---|
164 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz
|
---|
165 |
|
---|
166 | .PHONY: tarballs release nightly
|
---|
167 |
|
---|
168 | include $(PATH_KBUILD)/footer.kmk
|
---|
169 |
|
---|
170 |
|
---|