source: rtems/Makefile.maint @ e6a00cae

4.104.114.84.9
Last change on this file since e6a00cae was e6a00cae, checked in by Ralf Corsepius <ralf.corsepius@…>, on Jan 26, 2007 at 8:00:58 AM

New.

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