source: rtems/Makefile.maint @ 294030f5

4.104.114.84.9
Last change on this file since 294030f5 was 294030f5, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 26, 2007 at 12:11:11 PM

Misc. updates.

  • Property mode set to 100644
File size: 4.4 KB
Line 
1#
2# Maintainer Makefile
3#
4
5# WARNING:
6
7# THIS IS EXPERIMENTAL - DO NOT USE (YET) !
8
9# * This Makefile is only useful to RTEMS maintainers
10# * You must have write access to RTEMS CVS
11# * Running this Makefile modifies RTEMS CVS
12# * Watch out for warning and error messages - Do NOT IGNORE them!
13
14
15# MAINTAINER notes:
16
17# Cutting a new release:
18# 1. Perform a non-anonymous cvs checkout of the BRANCH
19#    you want to cut a release tarball from
20# 2. Run "make -f Makefile.maint new-minor"
21#    (rsp. "make -f Makefile.maint new-major").
22# 3. Run "make -f Makefile.maint commit"
23# 4. Run "make -f Makefile.maint tag"
24# 5. Run "make -f Makefine.maint tarball"
25
26# -----------------
27# SECURITY: Append a string to tag to avoid accidentially screwing up cvs-tags
28# For "hot runs" you will want to use "make -f Makefile.maint TEST_TAG= <command>"
29TEST_TAG = -test1
30
31rtems_version := $(shell cat aclocal/version.m4 | sed -n '/_RTEMS_VERSION/{s/^.*VERSION.*\[\(.*\)\].*/\1/p};')
32rtems_tag     := $(shell echo "rtems-$(rtems_version)" | tr . -)
33
34# -----------------
35# Cleanup check out and cvs-tag the files inside
36tag:
37        cvs -z9 up -dP >/dev/null
38        @./bootstrap -p >/dev/null
39        cvs tag -c $(rtems_tag)$(TEST_TAG) >/dev/null
40
41# -----------------
42# Different stages of cvs-exporting
43rtems-$(rtems_version)/stamp.export:
44        cvs -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TEST_TAG) rtems
45        touch rtems-$(rtems_version)/stamp.export
46
47rtems-$(rtems_version).tar.bz2: rtems-$(rtems_version)/stamp.autofiles rtems-$(rtems_version)/excludes
48        tar -cj -X rtems-$(rtems_version)/excludes \
49          -f rtems-$(rtems_version).tar.bz2 rtems-$(rtems_version)
50
51rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export
52        find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
53        find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
54        touch rtems-$(rtems_version)/c/src/librdbg/src/*/*/remdeb*.[hc]
55        rm -rf rtems-$(rtems_version)/contrib
56        touch rtems-$(rtems_version)/stamp.cleanup
57
58rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
59        cd rtems-$(rtems_version) && ./bootstrap -r
60        touch rtems-$(rtems_version)/stamp.autofiles
61
62rtems-$(rtems_version)/excludes: Makefile.maint
63        @echo "Generating $@"
64        @echo "excludes" > $@
65        @echo "stamp.*" >> $@
66        @echo "autom4te.cache" >> $@
67        @echo "Makefile.maint" >> $@
68
69tarball: rtems-$(rtems_version).tar.bz2
70
71# -----------------
72# Create a new major release
73# increments the 2nd digit of the version number
74# set the 3rd digit of the version number to 0
75# Example: 4.6.99.4 -> 4.7.0
76new-major:
77        @v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
78        r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
79        r=$$(($$r + 1)); version="$$v.$$r.0"; \
80        echo "New major release: $$version"; \
81        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
82          $(VERSION_FILES); \
83        v=$$(echo $${version} | sed 's,^\([0-9]\+\).*,\1,'); \
84        m=$$(echo $${version} | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
85        n=$$(echo $${version} | sed 's,^[0-9]\+\.[0-9]\+\.\([0-9]\+\).*,\1,'); \
86        sed -i \
87          -e "s,^\(#define.*__RTEMS_MAJOR__\).*,\1      $$v," \
88          -e "s,^\(#define.*__RTEMS_MINOR__\).*,\1      $$m," \
89          -e "s,^\(#define.*__RTEMS_REVISION__\).*,\1   $$n," \
90          cpukit/score/include/rtems/system.h
91
92# Create a new minor release
93# increments the last digit of the version number
94# Examples: 4.6.99.4 -> 4.6.99.5
95#           4.7.0 -> 4.7.1
96new-minor:
97        @m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
98        n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
99        n=$$(($$n + 1)); version="$$m.$$n";\
100        echo "New minor release: $$version"; \
101        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
102          $(VERSION_FILES); \
103        v=$$(echo $${version} | sed 's,^\([0-9]\+\).*,\1,'); \
104        m=$$(echo $${version} | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
105        n=$$(echo $${version} | sed 's,^[0-9]\+\.[0-9]\+\.\([0-9]\+\).*,\1,'); \
106        sed -i \
107          -e "s,^\(#define.*__RTEMS_MAJOR__\).*,\1      $$v," \
108          -e "s,^\(#define.*__RTEMS_MINOR__\).*,\1      $$m," \
109          -e "s,^\(#define.*__RTEMS_REVISION__\).*,\1   $$n," \
110          cpukit/score/include/rtems/system.h
111
112VERSION_FILES += aclocal/version.m4
113VERSION_FILES += cpukit/aclocal/version.m4
114VERSION_FILES += c/src/aclocal/version.m4
115VERSION_FILES += testsuites/aclocal/version.m4
116
117commit:
118        cvs -n commit -m "Upgrade to $(rtems_version)" $(VERSION_FILES) \
119          cpukit/score/include/rtems/system.h
120
121.PHONY: commit new-major new-minor tag tarball
Note: See TracBrowser for help on using the repository browser.