mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
This commit was manufactured by cvs2svn to create branch 'rtems-4-7-branch'.
Cherrypick from master 2007-02-21 18:10:50 UTC Ralf Corsepius <ralf.corsepius@rtems.org> 'Misc. hacks': Makefile.maint cpukit/libcsupport/src/getpagesize.c
This commit is contained in:
113
Makefile.maint
Normal file
113
Makefile.maint
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#
|
||||||
|
# Maintainer Makefile
|
||||||
|
#
|
||||||
|
|
||||||
|
# WARNING:
|
||||||
|
|
||||||
|
# THIS IS EXPERIMENTAL - DO NOT USE (YET) !
|
||||||
|
|
||||||
|
# * This Makefile is only useful to RTEMS maintainers
|
||||||
|
# * You must have write access to RTEMS CVS
|
||||||
|
# * Running this Makefile modifies RTEMS CVS
|
||||||
|
# * Watch out for warning and error messages - Do NOT IGNORE them!
|
||||||
|
|
||||||
|
|
||||||
|
# MAINTAINER notes:
|
||||||
|
|
||||||
|
# Cutting a new release:
|
||||||
|
# 1. Perform a non-anonymous cvs checkout of the BRANCH
|
||||||
|
# you want to cut a release tarball from
|
||||||
|
# 2. Run "make -f Makefile.maint new-revision"
|
||||||
|
# (rsp. "make -f Makefile.maint new-minor").
|
||||||
|
# 3. Run "make -f Makefile.maint commit"
|
||||||
|
# 4. Run "make -f Makefile.maint tag"
|
||||||
|
# 5. Run "make -f Makefine.maint tarball"
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# SECURITY: Append a string to tag to avoid accidentially screwing up cvs-tags
|
||||||
|
# For "hot runs" you will want to use "make -f Makefile.maint TEST_TAG= <command>"
|
||||||
|
TEST_TAG = -test1
|
||||||
|
|
||||||
|
rtems_version := $(shell cat VERSION | sed -n '/.* Version /{s/^.*Version[ ]*\([0-9\.]\+\)/\1/p};')
|
||||||
|
rtems_tag := $(shell echo "rtems-$(rtems_version)" | tr . -)
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# Cleanup check out and cvs-tag the files inside
|
||||||
|
tag:
|
||||||
|
cvs -z9 up -dP >/dev/null
|
||||||
|
PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -p >/dev/null
|
||||||
|
cvs tag -c $(rtems_tag)$(TEST_TAG) >/dev/null
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# Different stages of cvs-exporting
|
||||||
|
rtems-$(rtems_version)/stamp.export:
|
||||||
|
rm -rf rtems-$(rtems_version)
|
||||||
|
@cvs -z9 export -d rtems-$(rtems_version) -r $(rtems_tag)$(TEST_TAG) rtems >/dev/null
|
||||||
|
@if ! test -f rtems-$(rtems_version)/VERSION; then \
|
||||||
|
echo "ERROR export failed"; \
|
||||||
|
echo " Did you run 'make -f Makefile.maint tag' ?"; exit1; fi
|
||||||
|
touch rtems-$(rtems_version)/stamp.export
|
||||||
|
|
||||||
|
rtems-$(rtems_version).tar.bz2: rtems-$(rtems_version)/stamp.autofiles rtems-$(rtems_version)/excludes
|
||||||
|
tar -cj -X rtems-$(rtems_version)/excludes \
|
||||||
|
-f rtems-$(rtems_version).tar.bz2 rtems-$(rtems_version)
|
||||||
|
|
||||||
|
rtems-$(rtems_version)/stamp.cleanup: rtems-$(rtems_version)/stamp.export
|
||||||
|
find rtems-$(rtems_version) -name .cvsignore -exec rm -f {} \;
|
||||||
|
find rtems-$(rtems_version) -name preinstall.am -exec touch {} \;
|
||||||
|
touch rtems-$(rtems_version)/c/src/librdbg/src/*/*/remdeb*.[hc]
|
||||||
|
rm -rf rtems-$(rtems_version)/contrib
|
||||||
|
touch rtems-$(rtems_version)/stamp.cleanup
|
||||||
|
|
||||||
|
rtems-$(rtems_version)/stamp.autofiles: rtems-$(rtems_version)/stamp.cleanup
|
||||||
|
cd rtems-$(rtems_version) && PATH=/opt/rtems-4.8/bin:$$PATH ./bootstrap -r
|
||||||
|
touch rtems-$(rtems_version)/stamp.autofiles
|
||||||
|
|
||||||
|
rtems-$(rtems_version)/excludes: Makefile.maint
|
||||||
|
@echo "Generating $@"
|
||||||
|
@echo "excludes" > $@
|
||||||
|
@echo "stamp.*" >> $@
|
||||||
|
@echo "autom4te.cache" >> $@
|
||||||
|
@echo "Makefile.maint" >> $@
|
||||||
|
|
||||||
|
tarball: rtems-$(rtems_version).tar.bz2
|
||||||
|
|
||||||
|
# -----------------
|
||||||
|
# Create a new minor release
|
||||||
|
# increments the 2nd digit of the version number
|
||||||
|
# set the 3rd digit of the version number to 0
|
||||||
|
# Example: 4.6.99.4 -> 4.7.0
|
||||||
|
new-minor:
|
||||||
|
@v=$$(echo $(rtems_version) | sed 's,^\([0-9]\+\).*,\1,'); \
|
||||||
|
r=$$(echo $(rtems_version) | sed 's,^[0-9]\+\.\([0-9]\+\).*,\1,'); \
|
||||||
|
r=$$(($$r + 1)); version="$$v.$$r.0"; \
|
||||||
|
echo "New minor release: $$version"; \
|
||||||
|
sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
|
||||||
|
$(VERSION_FILES); \
|
||||||
|
sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
|
||||||
|
|
||||||
|
# Create a new revision release
|
||||||
|
# increments the last digit of the version number
|
||||||
|
# Examples: 4.6.99.4 -> 4.6.99.5
|
||||||
|
# 4.7.0 -> 4.7.1
|
||||||
|
new-revision:
|
||||||
|
@m=$$(echo $(rtems_version) | sed 's,^\(.*\)\.[0-9]\+,\1,'); \
|
||||||
|
n=$$(echo $(rtems_version) | sed 's,^.*\.\([0-9]\+\),\1,'); \
|
||||||
|
n=$$(($$n + 1)); version="$$m.$$n";\
|
||||||
|
echo "New revision release: $$version"; \
|
||||||
|
sed -i -e "s|\[_RTEMS_VERSION\],\[.*\]|\[_RTEMS_VERSION\],\[$$version\]|" \
|
||||||
|
$(VERSION_FILES); \
|
||||||
|
sed -i -e "s,\(^RTEMS Version\).*,\1 $$version," VERSION
|
||||||
|
|
||||||
|
VERSION_FILES += aclocal/version.m4
|
||||||
|
VERSION_FILES += cpukit/aclocal/version.m4
|
||||||
|
VERSION_FILES += c/src/aclocal/version.m4
|
||||||
|
VERSION_FILES += testsuites/aclocal/version.m4
|
||||||
|
|
||||||
|
CVS_RUN := $(shell if [ -n "$(TEST_TAG)" ]; then echo "cvs -n"; else echo "cvs"; fi)
|
||||||
|
|
||||||
|
commit:
|
||||||
|
$(CVS_RUN) commit -m "Upgrade to $(rtems_version)" \
|
||||||
|
$(VERSION_FILES) VERSION
|
||||||
|
|
||||||
|
.PHONY: commit new-minor new-revision tag tarball
|
||||||
24
cpukit/libcsupport/src/getpagesize.c
Normal file
24
cpukit/libcsupport/src/getpagesize.c
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
|
||||||
|
/*PAGE
|
||||||
|
*
|
||||||
|
* Get System Page Size (from SVR4 and 4.2+ BSD)
|
||||||
|
*
|
||||||
|
* This is not a functional version but the SPARC backend for at least
|
||||||
|
* gcc 2.8.1 plus gnat 3.13p and gcc 3.0.1 require it to be there and
|
||||||
|
* return a reasonable value.
|
||||||
|
*/
|
||||||
|
|
||||||
|
size_t getpagesize(void)
|
||||||
|
{
|
||||||
|
return PAGE_SIZE;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user