source: rtems/Makefile.maint @ 27ccd807

4.104.114.84.9
Last change on this file since 27ccd807 was 27ccd807, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 2, 2007 at 3:01:29 PM

2007-08-02 Joel Sherrill <joel.sherrill@…>

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