source: rtems/Makefile.maint @ 85cf337

4.104.114.84.95
Last change on this file since 85cf337 was 85cf337, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/22/07 at 08:10:46

Move TOOL_VERSIONS into tarball.

  • Property mode set to 100644
File size: 4.5 KB
RevLine 
[e6a00cae]1#
2# Maintainer Makefile
3#
4
5# WARNING:
[294030f5]6
7# THIS IS EXPERIMENTAL - DO NOT USE (YET) !
8
[e6a00cae]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
[859fbb49]20# 2. Run "make -f Makefile.maint new-revision"
21#    (rsp. "make -f Makefile.maint new-minor").
[294030f5]22# 3. Run "make -f Makefile.maint commit"
23# 4. Run "make -f Makefile.maint tag"
[f9f1d96]24# 5. Run "make -f Makefile.maint tarball"
[e6a00cae]25
26# -----------------
[294030f5]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>"
[e6a00cae]29TEST_TAG = -test1
30
[8b75a07]31rtems_version := $(shell cat VERSION | sed -n '/.* Version /{s/^.*Version[ ]*\([0-9\.]\+\)/\1/p};')
[e6a00cae]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
[b4f45706]38        PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -p >/dev/null
[e6a00cae]39        cvs tag -c $(rtems_tag)$(TEST_TAG) >/dev/null
40
41# -----------------
42# Different stages of cvs-exporting
43rtems-$(rtems_version)/stamp.export:
[2daec3b2]44        rm -rf rtems-$(rtems_version)
[b85e49d]45        @cvs -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TEST_TAG) rtems >/dev/null
[d36bfd19]46        @if ! test -f rtems-$(rtems_version)/VERSION; then \
[039970a]47        echo "ERROR export failed"; \
[0496121]48        echo " Did you run 'make -f Makefile.maint tag' ?"; exit1; fi
[e6a00cae]49        touch rtems-$(rtems_version)/stamp.export
50
[85cf337]51rtems-$(rtems_version).tar.bz2: rtems-$(rtems_version)/stamp.autofiles \
52          rtems-$(rtems_version)/excludes \
53          rtems-$(rtems_version)/TOOL_VERSIONS
[e6a00cae]54        tar -cj -X rtems-$(rtems_version)/excludes \
55          -f rtems-$(rtems_version).tar.bz2 rtems-$(rtems_version)
56
57rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export
58        find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
59        find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
60        touch rtems-$(rtems_version)/c/src/librdbg/src/*/*/remdeb*.[hc]
61        rm -rf rtems-$(rtems_version)/contrib
62        touch rtems-$(rtems_version)/stamp.cleanup
63
64rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
[03d1fed8]65        cd rtems-$(rtems_version) && PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -r
[e6a00cae]66        touch rtems-$(rtems_version)/stamp.autofiles
67
68rtems-$(rtems_version)/excludes: Makefile.maint
69        @echo "Generating $@"
70        @echo "excludes" > $@
71        @echo "stamp.*" >> $@
72        @echo "autom4te.cache" >> $@
73        @echo "Makefile.maint" >> $@
74
75tarball: rtems-$(rtems_version).tar.bz2
76
[85cf337]77rtems-$(rtems_version)/TOOL_VERSIONS: Makefile.maint
[f9f1d96]78        ( \
79         date ; \
80         echo ; \
81         echo "This file contains configuration information on the " ; \
82         echo "primary computer used to test and make the $(rtems_version)" ; \
83         echo "version of RTEMS" ; \
84         echo ; \
85         echo "OS Version: " `head -1 /etc/issue` ; \
86         echo ; \
87         echo "The following RTEMS RPMs were installed on the machine" ; \
88         echo "where this release was made:" ; \
89         echo ; \
[ceb5acf]90         rpm -qa 'rtems-4.8*' | sed -e 's/^/    /' ; \
[f9f1d96]91         echo \
[85cf337]92         ) > $@
[f9f1d96]93
[e6a00cae]94# -----------------
[859fbb49]95# Create a new minor release
[e6a00cae]96# increments the 2nd digit of the version number
97# set the 3rd digit of the version number to 0
98# Example: 4.6.99.4 -> 4.7.0
[859fbb49]99new-minor:
[e6a00cae]100        @v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
101        r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
102        r=$$(($$r + 1)); version="$$v.$$r.0"; \
[859fbb49]103        echo "New minor release: $$version"; \
[e6a00cae]104        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
[8b75a07]105          $(VERSION_FILES); \
106        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
[e6a00cae]107
[859fbb49]108# Create a new revision release
[e6a00cae]109# increments the last digit of the version number
110# Examples: 4.6.99.4 -> 4.6.99.5
111#           4.7.0 -> 4.7.1
[859fbb49]112new-revision:
[e6a00cae]113        @m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
114        n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
115        n=$$(($$n + 1)); version="$$m.$$n";\
[859fbb49]116        echo "New revision release: $$version"; \
[e6a00cae]117        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
[8b75a07]118          $(VERSION_FILES); \
119        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
[e6a00cae]120
121VERSION_FILES += aclocal/version.m4
122VERSION_FILES += cpukit/aclocal/version.m4
123VERSION_FILES += c/src/aclocal/version.m4
124VERSION_FILES += testsuites/aclocal/version.m4
125
[952a969]126CVS_RUN := $(shell if [ -n "$(TEST_TAG)" ]; then echo "cvs -n"; else echo "cvs"; fi)
127
[294030f5]128commit:
[5749232]129        $(CVS_RUN) commit -m "Testing: Upgrade to $(rtems_version)" \
[8b75a07]130          $(VERSION_FILES) VERSION
[294030f5]131
[859fbb49]132.PHONY: commit new-minor new-revision tag tarball
Note: See TracBrowser for help on using the repository browser.