source: rtems/Makefile.maint @ 1fa64f9

4.104.114.84.9
Last change on this file since 1fa64f9 was e6a77a15, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 22, 2007 at 8:57:44 AM

Rename TEST_TAG into TAG_SUFFIX.

  • Property mode set to 100644
File size: 4.6 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
18# Cutting a new release:
19# 1. Perform a non-anonymous cvs checkout of the BRANCH
20#    you want to cut a release tarball from
21# 2. Run "make -f Makefile.maint new-revision"
22#    (rsp. "make -f Makefile.maint new-minor").
23# 3. Run "make -f Makefile.maint commit"
24# 4. Run "make -f Makefile.maint tag"
25# 5. Run "make -f Makefile.maint tarball"
26
27# -----------------
28# SECURITY: Append a string to tag to avoid accidentially screwing up cvs-tags
29# For "hot runs" you will want to use "make -f Makefile.maint TAG_SUFFIX= <command>"
30TAG_SUFFIX = -test1
31
32rtems_version := $(shell cat VERSION | sed -n '/.* Version /{s/^.*Version[ ]*\([0-9\.]\+\)/\1/p};')
33rtems_tag     := $(shell echo "rtems-$(rtems_version)" | tr . -)
34
35# -----------------
36# Cleanup check out and cvs-tag the files inside
37tag:
38        cvs -z9 up -dP >/dev/null
39        PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -p >/dev/null
40        cvs tag -c $(rtems_tag)$(TAG_SUFFIX) >/dev/null
41
42# -----------------
43# Different stages of cvs-exporting
44rtems-$(rtems_version)/stamp.export:
45        rm -rf rtems-$(rtems_version)
46        @cvs -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TAG_SUFFIX) rtems >/dev/null
47        @if ! test -f rtems-$(rtems_version)/VERSION; then \
48        echo "ERROR export failed"; \
49        echo " Did you run 'make -f Makefile.maint tag' ?"; exit1; fi
50        touch rtems-$(rtems_version)/stamp.export
51
52rtems-$(rtems_version).tar.bz2: rtems-$(rtems_version)/stamp.autofiles \
53          rtems-$(rtems_version)/excludes \
54          rtems-$(rtems_version)/TOOL_VERSIONS
55        tar -cj -X rtems-$(rtems_version)/excludes \
56          -f rtems-$(rtems_version).tar.bz2 rtems-$(rtems_version)
57
58rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export
59        find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
60        find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
61        touch rtems-$(rtems_version)/c/src/librdbg/src/*/*/remdeb*.[hc]
62        rm -rf rtems-$(rtems_version)/contrib
63        touch rtems-$(rtems_version)/stamp.cleanup
64
65rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
66        cd rtems-$(rtems_version) && PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -r
67        touch rtems-$(rtems_version)/stamp.autofiles
68
69rtems-$(rtems_version)/excludes: Makefile.maint
70        @echo "Generating $@"
71        @echo "excludes" > $@
72        @echo "stamp.*" >> $@
73        @echo "autom4te.cache" >> $@
74        @echo "Makefile.maint" >> $@
75
76tarball: rtems-$(rtems_version).tar.bz2
77
78rtems-$(rtems_version)/TOOL_VERSIONS: Makefile.maint
79        ( \
80         date ; \
81         echo ; \
82         echo "This file contains configuration information on the " ; \
83         echo "primary computer used to test and make the $(rtems_version)" ; \
84         echo "version of RTEMS" ; \
85         echo ; \
86         echo "OS Version: " `head -1 /etc/issue` ; \
87         echo ; \
88         echo "The following RTEMS RPMs were installed on the machine" ; \
89         echo "where this release was made:" ; \
90         echo ; \
91         rpm -qa 'rtems-4.8*' | sed -e 's/^/    /' ; \
92         echo \
93         ) > $@
94
95# -----------------
96# Create a new minor release
97# increments the 2nd digit of the version number
98# set the 3rd digit of the version number to 0
99# Example: 4.6.99.4 -> 4.7.0
100new-minor:
101        @v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
102        r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
103        r=$$(($$r + 1)); version="$$v.$$r.0"; \
104        echo "New minor release: $$version"; \
105        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
106          $(VERSION_FILES); \
107        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
108
109# Create a new revision release
110# increments the last digit of the version number
111# Examples: 4.6.99.4 -> 4.6.99.5
112#           4.7.0 -> 4.7.1
113new-revision:
114        @m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
115        n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
116        n=$$(($$n + 1)); version="$$m.$$n";\
117        echo "New revision release: $$version"; \
118        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
119          $(VERSION_FILES); \
120        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
121
122VERSION_FILES += aclocal/version.m4
123VERSION_FILES += cpukit/aclocal/version.m4
124VERSION_FILES += c/src/aclocal/version.m4
125VERSION_FILES += testsuites/aclocal/version.m4
126
127CVS_RUN := $(shell if [ -n "$(TAG_SUFFIX)" ]; then echo "cvs -n"; else echo "cvs"; fi)
128
129commit:
130        $(CVS_RUN) commit -m "Testing: Upgrade to $(rtems_version)" \
131          $(VERSION_FILES) VERSION
132
133.PHONY: commit new-minor new-revision tag tarball
Note: See TracBrowser for help on using the repository browser.