1 | # $Id: MakefileMaint.kmk 1522 2008-04-13 01:22:30Z 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 | #
|
---|
31 | # Get svn info and parse it bit by bit (cygwin sucks).
|
---|
32 | #
|
---|
33 | $(PATH_TARGET)/svn-info.kmk + $(PATH_TARGET)/svn-info.tmp: .svn/entries .svn/all-wcprops .svn/format
|
---|
34 | $(MKDIR) -p $(@D)
|
---|
35 | $(RM) -f $@
|
---|
36 | $(REDIRECT) -o $(PATH_TARGET)/svn-info.tmp -- svn info .
|
---|
37 | $(SED) -e '/^URL:/!d' -e 's/URL: */KBUILD_SVN_URL :=/' --append $@ $(PATH_TARGET)/svn-info.tmp
|
---|
38 | $(SED) -e '/^Revision:/!d' -e 's/Revision: */KBUILD_SVN_REV :=/' --append $@ $(PATH_TARGET)/svn-info.tmp
|
---|
39 |
|
---|
40 | include $(PATH_TARGET)/svn-info.kmk
|
---|
41 |
|
---|
42 | CLEANS += \
|
---|
43 | $(PATH_TARGET)/svn-info.tmp \
|
---|
44 | $(PATH_TARGET)/svn-info.kmk
|
---|
45 |
|
---|
46 | RMTREE = $(ECHO) todo: $(RM) -Rf
|
---|
47 | RMTREE = rm -Rf
|
---|
48 |
|
---|
49 | #
|
---|
50 | # Creates the source tarballs.
|
---|
51 | #
|
---|
52 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
53 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
54 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
55 | svn export . $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
56 | tar cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar -C $(PATH_TARGET) kBuild-$(KBUILD_VERSION)/
|
---|
57 | gzip -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar
|
---|
58 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
59 |
|
---|
60 | CLEANS += \
|
---|
61 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \
|
---|
62 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz
|
---|
63 |
|
---|
64 |
|
---|
65 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
66 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
67 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
68 | svn export . $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
69 | tar cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar -C $(PATH_TARGET) kBuild-$(KBUILD_SVN_REV)/
|
---|
70 | gzip -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar
|
---|
71 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
72 |
|
---|
73 | CLEANS += \
|
---|
74 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \
|
---|
75 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
76 |
|
---|
77 | #
|
---|
78 | # Creates the binary tarballs.
|
---|
79 | #
|
---|
80 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
81 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
82 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
83 | $(MKDIR) -p $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)
|
---|
84 | svn export kBuild/ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/kBuild/
|
---|
85 | tar cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar -C $(PATH_TARGET) kBuild-$(KBUILD_VERSION)/
|
---|
86 | gzip -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar
|
---|
87 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)/
|
---|
88 |
|
---|
89 | CLEANS += \
|
---|
90 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \
|
---|
91 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz
|
---|
92 |
|
---|
93 |
|
---|
94 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz: | $(call DIRDEP,$(PATH_TARGET))
|
---|
95 | $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
96 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
97 | $(MKDIR) -p $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)
|
---|
98 | svn export kBuild/ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/kBuild/
|
---|
99 | tar cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar -C $(PATH_TARGET) kBuild-$(KBUILD_SVN_REV)/
|
---|
100 | gzip -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar
|
---|
101 | $(RMTREE) $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)/
|
---|
102 |
|
---|
103 | CLEANS += \
|
---|
104 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \
|
---|
105 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz
|
---|
106 |
|
---|
107 |
|
---|
108 | #
|
---|
109 | # Aliases
|
---|
110 | #
|
---|
111 | tarballs: \
|
---|
112 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
113 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
114 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
115 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
116 |
|
---|
117 | release: \
|
---|
118 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \
|
---|
119 | $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \
|
---|
120 |
|
---|
121 | nightly: \
|
---|
122 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \
|
---|
123 | $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz
|
---|
124 |
|
---|
125 | .PHONY: tarballs release nightly
|
---|
126 |
|
---|
127 | include $(PATH_KBUILD)/footer.kmk
|
---|
128 |
|
---|
129 |
|
---|