Don't append empty strings to variables. (foo +=)
[kbuild-mirror.git] / Maintenance.kmk
blob770fb41695e37e0c938bef3dff325fc8f045d65e
1 # $Id$
2 ## @file
3 # Maintenance Makefile for kBuild.
7 # Copyright (c) 2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
9 # This file is part of kBuild.
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.
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.
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
27 DEPTH = .
28 include $(PATH_KBUILD)/header.kmk
30 RMTREE = $(ECHO) todo: $(RM) -Rf
31 RMTREE = rm -Rf
32 SVN = svn
33 TAR = tar
34 GZIP = gzip
36 ifeq ($(strip $(KBUILD_SVN_INFO_KMK)),)
37 $(error wtf? KBUILD_SVN_INFO_KMK is empty!)
38 endif
41 # Creates the source tarballs.
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)/
52 OTHER_CLEAN += \
53 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \
54 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
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)/
66 OTHER_CLEAN += \
67 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \
68 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
71 # Creates the binary tarballs.
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)/
82 OTHER_CLEAN += \
83 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \
84 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
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)/
96 OTHER_CLEAN += \
97 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \
98 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
102 # Aliases
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
110 release: \
111 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
112 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
114 nightly: \
115 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
116 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
118 .PHONY: tarballs release nightly
120 include $(PATH_KBUILD)/footer.kmk