Changeset 6f3fb8a in rtems


Ignore:
Timestamp:
Nov 7, 2017, 5:43:11 AM (18 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
52841b58
Parents:
748a126
git-author:
Chris Johns <chrisj@…> (11/07/17 05:43:11)
git-committer:
Chris Johns <chrisj@…> (11/10/17 02:34:06)
Message:

cpukit: Add a Version API.

Provide functions to get the version string, major, minor and revision
numbers and the version control identifer that is a unique tag for
the version control system.

Update #3199.

Files:
8 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/Makefile.am

    r748a126 r6f3fb8a  
    2323include_rtems_HEADERS += include/rtems/timecounter.h
    2424include_rtems_HEADERS += include/rtems/timespec.h
     25include_rtems_HEADERS += include/rtems/version.h
    2526
    2627EXTRA_DIST = include/rtems/README
     
    3536    src/chainappendnotify.c src/chaingetnotify.c src/chaingetwait.c \
    3637    src/chainprependnotify.c src/rbheap.c src/interrtext.c \
    37     src/fatalsrctext.c
     38    src/fatalsrctext.c src/version.c
    3839libsapi_a_SOURCES += src/chainprotected.c
    3940libsapi_a_SOURCES += src/cpucounterconverter.c
     
    4849libsapi_a_CPPFLAGS = $(AM_CPPFLAGS)
    4950
     51#
     52# Create a new Version VC Key header if the VC state has changed.
     53#
     54vc_key_stamp = $(am__leading_dot)vc-key-stamp
     55
     56libsapi_a_CPPFLAGS += -I.
     57
     58BUILT_SOURCES = version-vc-key.h
     59
     60.PHONY: $(vc_key_stamp)
     61
     62$(vc_key_stamp):
     63
     64version-vc-key.h: $(vc_key_stamp)
     65        @+current_vc_key=""; \
     66        if test -f $(vc_key_stamp); then \
     67         current_vc_key=`cat $(vc_key_stamp)`; \
     68        fi; \
     69        vc_key=`$(top_srcdir)/sapi/vc-key.sh $(top_srcdir) $$current_vc_key`; \
     70        if test "$$vc_key" != "matches"; then \
     71         echo "Generating version-vc-key.h"; \
     72         if test "$$vc_key" == "release"; then \
     73          vc_header_key="\/\* No version control key found; release\? \*\/"; \
     74         else \
     75          vc_header_key="#define RTEMS_VERSION_VC_KEY \"$$vc_key\""; \
     76         fi; \
     77         cat $(top_srcdir)/sapi/version-vc-key.h.in | \
     78          sed -e "s/@VERSION_VC_KEY@/$$vc_header_key/g" > version-vc-key.h; \
     79         echo "$$vc_key" > $(vc_key_stamp); \
     80        fi
     81
     82version.$(OBJEXT):$ version-vc-key.h
     83
     84all-local: version-vc-key.h
     85
    5086include $(srcdir)/preinstall.am
    5187include $(top_srcdir)/automake/local.am
  • cpukit/sapi/preinstall.am

    r748a126 r6f3fb8a  
    9595PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/timespec.h
    9696
     97$(PROJECT_INCLUDE)/rtems/version.h: include/rtems/version.h $(PROJECT_INCLUDE)/rtems/$(dirstamp)
     98        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/version.h
     99PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/version.h
     100
  • testsuites/sptests/Makefile.am

    r748a126 r6f3fb8a  
    8383_SUBDIRS += spclock_err02
    8484_SUBDIRS += spcpuset01
     85_SUBDIRS += spversion01
    8586
    8687include $(top_srcdir)/../automake/subdirs.am
  • testsuites/sptests/configure.ac

    r748a126 r6f3fb8a  
    254254sppartition_err01/Makefile
    255255sprmsched01/Makefile
     256spversion01/Makefile
    256257])
    257258AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.