1 | # $Id: Maintenance.kmk 1525 2008-04-13 01:58:13Z 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 2 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, write to the Free Software
|
---|
23 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
---|
24 | #
|
---|
25 | #
|
---|
26 |
|
---|
27 | DEPTH = .
|
---|
28 | include $(PATH_KBUILD)/header.kmk
|
---|
29 |
|
---|
30 | RMTREE = $(ECHO) todo: $(RM) -Rf
|
---|
31 | RMTREE = rm -Rf
|
---|
32 | SVN = svn
|
---|
33 | TAR = tar
|
---|
34 | GZIP = gzip
|
---|
35 |
|
---|
36 | ifeq ($(strip $(KBUILD_SVN_INFO_KMK)),)
|
---|
37 | $(error wtf? KBUILD_SVN_INFO_KMK is empty!)
|
---|
38 | endif
|
---|
39 |
|
---|
40 | #
|
---|
41 | # Creates the source tarballs.
|
---|
42 | #
|
---|
43 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz: | $(call DIRDEP,$(PATH_TARGET)) $(KBUILD_SVN_INFO_DEP)
|
---|
44 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
45 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
46 | $(SVN) export . $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
47 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/SvnInfo.kmk
|
---|
48 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar -C $(PATH_TARGET) kBuild-$(KBUILD_VERSION)/
|
---|
49 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar
|
---|
50 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
51 |
|
---|
52 | OTHER_CLEAN += \
|
---|
53 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \
|
---|
54 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
55 |
|
---|
56 |
|
---|
57 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz: | $(call DIRDEP,$(PATH_TARGET)) $(KBUILD_SVN_INFO_DEP)
|
---|
58 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
59 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
60 | $(SVN) export . $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
61 | $(INSTALL) $(KBUILD_SVN_INFO_KMK) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/SvnInfo.kmk
|
---|
62 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar -C $(PATH_TARGET) kBuild-$(KBUILD_SVN_REV)/
|
---|
63 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar
|
---|
64 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
65 |
|
---|
66 | OTHER_CLEAN += \
|
---|
67 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \
|
---|
68 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
69 |
|
---|
70 | #
|
---|
71 | # Creates the binary tarballs.
|
---|
72 | #
|
---|
73 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
74 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
75 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
76 | $(MKDIR) -p $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)
|
---|
77 | $(SVN) export kBuild/ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/kBuild/
|
---|
78 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar -C $(PATH_TARGET) kBuild-$(KBUILD_VERSION)/
|
---|
79 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar
|
---|
80 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
81 |
|
---|
82 | OTHER_CLEAN += \
|
---|
83 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \
|
---|
84 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
85 |
|
---|
86 |
|
---|
87 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
88 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
89 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
90 | $(MKDIR) -p $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)
|
---|
91 | $(SVN) export kBuild/ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/kBuild/
|
---|
92 | $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar -C $(PATH_TARGET) kBuild-$(KBUILD_SVN_REV)/
|
---|
93 | $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar
|
---|
94 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
95 |
|
---|
96 | OTHER_CLEAN += \
|
---|
97 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \
|
---|
98 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
99 |
|
---|
100 |
|
---|
101 | #
|
---|
102 | # Aliases
|
---|
103 | #
|
---|
104 | tarballs: \
|
---|
105 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
106 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
107 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
108 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
109 |
|
---|
110 | release: \
|
---|
111 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
112 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
113 |
|
---|
114 | nightly: \
|
---|
115 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
116 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
117 |
|
---|
118 | .PHONY: tarballs release nightly
|
---|
119 |
|
---|
120 | include $(PATH_KBUILD)/footer.kmk
|
---|
121 |
|
---|
122 |
|
---|