source: rtems/Makefile.maint @ 803eac9

Last change on this file since 803eac9 was 48a7fa3, checked in by Joel Sherrill <joel@…>, on Nov 15, 2016 at 4:37:59 PM

Remove texinfo format documentation. Replaced by Sphinx formatted documentation.

closes #2812.

  • Property mode set to 100644
File size: 5.4 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
[e6a77a15]17
[e6a00cae]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
[859fbb49]21# 2. Run "make -f Makefile.maint new-revision"
22#    (rsp. "make -f Makefile.maint new-minor").
[294030f5]23# 3. Run "make -f Makefile.maint commit"
24# 4. Run "make -f Makefile.maint tag"
[f9f1d96]25# 5. Run "make -f Makefile.maint tarball"
[e6a00cae]26
27# -----------------
[294030f5]28# SECURITY: Append a string to tag to avoid accidentially screwing up cvs-tags
[e6a77a15]29# For "hot runs" you will want to use "make -f Makefile.maint TAG_SUFFIX= <command>"
30TAG_SUFFIX = -test1
[e6a00cae]31
[8b75a07]32rtems_version := $(shell cat VERSION | sed -n '/.* Version /{s/^.*Version[ ]*\([0-9\.]\+\)/\1/p};')
[e6a00cae]33rtems_tag     := $(shell echo "rtems-$(rtems_version)" | tr . -)
[cd5e926]34rtems_api     := 4.10
[b481c8a]35PATH          := /opt/rtems-$(rtems_api)/bin:$(PATH)
[e6a00cae]36
37# -----------------
38# Cleanup check out and cvs-tag the files inside
39tag:
[76c6166a]40        cvs -q -z9 up -dP
[b481c8a]41        ./bootstrap -p >/dev/null
[76c6166a]42        cvs -q tag -c $(rtems_tag)$(TAG_SUFFIX)
[e6a00cae]43
44# -----------------
45# Different stages of cvs-exporting
[4380436]46rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX):
[2daec3b2]47        rm -rf rtems-$(rtems_version)
[76c6166a]48        @cvs -q -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TAG_SUFFIX) rtems
[d36bfd19]49        @if ! test -f rtems-$(rtems_version)/VERSION; then \
[039970a]50        echo "ERROR export failed"; \
[4a2337cd]51        echo " Did you run 'make -f Makefile.maint tag' ?"; exit 1; fi
[4380436]52        echo "$(rtems_tag)$(TAG_SUFFIX)" > rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX)
[e6a00cae]53
[4380436]54rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2: rtems-$(rtems_version)/stamp.autofiles \
[85cf337]55          rtems-$(rtems_version)/excludes \
56          rtems-$(rtems_version)/TOOL_VERSIONS
[e6a00cae]57        tar -cj -X rtems-$(rtems_version)/excludes \
[4380436]58          -f rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2 rtems-$(rtems_version)
[e6a00cae]59
[ecda1e4]60## Touching the top pages in the various manuals results in the date
61## on their title page matching the release date.
[4380436]62rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export.$(rtems_tag)$(TAG_SUFFIX)
[e6a00cae]63        find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
64        find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
65        rm -rf rtems-$(rtems_version)/contrib
66        touch rtems-$(rtems_version)/stamp.cleanup
67
68rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
[b481c8a]69        cd rtems-$(rtems_version) && ./bootstrap -r
[e6a00cae]70        touch rtems-$(rtems_version)/stamp.autofiles
71
72rtems-$(rtems_version)/excludes: Makefile.maint
73        @echo "Generating $@"
74        @echo "excludes" > $@
75        @echo "stamp.*" >> $@
76        @echo "autom4te.cache" >> $@
77        @echo "Makefile.maint" >> $@
78
[4380436]79tarball: rtems-$(rtems_version)$(TAG_SUFFIX).tar.bz2
[e6a00cae]80
[85cf337]81rtems-$(rtems_version)/TOOL_VERSIONS: Makefile.maint
[f9f1d96]82        ( \
83         date ; \
84         echo ; \
85         echo "This file contains configuration information on the " ; \
86         echo "primary computer used to test and make the $(rtems_version)" ; \
87         echo "version of RTEMS" ; \
88         echo ; \
89         echo "OS Version: " `head -1 /etc/issue` ; \
90         echo ; \
91         echo "The following RTEMS RPMs were installed on the machine" ; \
92         echo "where this release was made:" ; \
93         echo ; \
[b481c8a]94         rpm -qa 'rtems-$(rtems_api)-*' | sort | sed -e 's/^/    /' ; \
[f9f1d96]95         echo \
[85cf337]96         ) > $@
[f9f1d96]97
[e6a00cae]98# -----------------
[859fbb49]99# Create a new minor release
[e6a00cae]100# increments the 2nd digit of the version number
101# set the 3rd digit of the version number to 0
102# Example: 4.6.99.4 -> 4.7.0
[859fbb49]103new-minor:
[e6a00cae]104        @v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
105        r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
106        r=$$(($$r + 1)); version="$$v.$$r.0"; \
[859fbb49]107        echo "New minor release: $$version"; \
[e6a00cae]108        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
[8b75a07]109          $(VERSION_FILES); \
110        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
[e6a00cae]111
[859fbb49]112# Create a new revision release
[e6a00cae]113# increments the last digit of the version number
114# Examples: 4.6.99.4 -> 4.6.99.5
115#           4.7.0 -> 4.7.1
[859fbb49]116new-revision:
[e6a00cae]117        @m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
118        n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
119        n=$$(($$n + 1)); version="$$m.$$n";\
[859fbb49]120        echo "New revision release: $$version"; \
[e6a00cae]121        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
[8b75a07]122          $(VERSION_FILES); \
123        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
[e6a00cae]124
[70d7dc22]125# -----------------
126# Create a new branch
127# increments the 2nd digit of the version number
128# set the 3rd digit of the version number to 99
129# set the 4rd digit of the version number to 0
130# Example: 4.6.34.4 -> 4.7.99.0
131new-branch:
132        v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
133        r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
134        r=$$(($$r + 1)); version="$$v.$$r.99.0"; \
135        api="$$v.$$(($$r + 1))"; \
136        echo "New branch release: $$version"; \
137        sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
[b42cae7]138          -e "s|\[_RTEMS_API\],\[.*\]|\[_RTEMS_API\],\[$$api\]|" \
[70d7dc22]139          $(VERSION_FILES); \
140        sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
141
[e6a00cae]142VERSION_FILES += aclocal/version.m4
143VERSION_FILES += cpukit/aclocal/version.m4
144VERSION_FILES += c/src/aclocal/version.m4
145VERSION_FILES += testsuites/aclocal/version.m4
146
[e6a77a15]147CVS_RUN := $(shell if [ -n "$(TAG_SUFFIX)" ]; then echo "cvs -n"; else echo "cvs"; fi)
[952a969]148
[294030f5]149commit:
[b481c8a]150        $(CVS_RUN) commit -m "Upgrade to $(rtems_version)" \
[8b75a07]151          $(VERSION_FILES) VERSION
[294030f5]152
[cd5e926]153.PHONY: commit new-minor new-revision new-branch tag tarball
Note: See TracBrowser for help on using the repository browser.