From 54c0b577a8bc39b4f64a4dcc46c074a9de0881b7 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 12 Sep 2018 16:03:42 +0200 Subject: build: Move sapi/Makefile.am --- cpukit/Makefile.am | 76 ++++++++++++++++++++++++++++++++++++++++- cpukit/configure.ac | 1 - cpukit/sapi/Makefile.am | 63 ---------------------------------- cpukit/sapi/vc-key.sh | 39 --------------------- cpukit/sapi/version-vc-key.h.in | 7 ---- cpukit/vc-key.sh | 39 +++++++++++++++++++++ cpukit/version-vc-key.h.in | 7 ++++ cpukit/wrapup/Makefile.am | 2 +- 8 files changed, 122 insertions(+), 112 deletions(-) delete mode 100644 cpukit/sapi/Makefile.am delete mode 100755 cpukit/sapi/vc-key.sh delete mode 100644 cpukit/sapi/version-vc-key.h.in create mode 100755 cpukit/vc-key.sh create mode 100644 cpukit/version-vc-key.h.in (limited to 'cpukit') diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am index e137628b86..e6ac07a06c 100644 --- a/cpukit/Makefile.am +++ b/cpukit/Makefile.am @@ -3,8 +3,82 @@ ACLOCAL_AMFLAGS = -I aclocal include $(top_srcdir)/automake/compile.am include $(top_srcdir)/automake/multilib.am +noinst_LIBRARIES = libcpukit.a + +libcpukit_a_SOURCES = +libcpukit_a_SOURCES += sapi/src/chainappendnotify.c +libcpukit_a_SOURCES += sapi/src/chaingetnotify.c +libcpukit_a_SOURCES += sapi/src/chaingetwait.c +libcpukit_a_SOURCES += sapi/src/chainprependnotify.c +libcpukit_a_SOURCES += sapi/src/chainprotected.c +libcpukit_a_SOURCES += sapi/src/cpucounterconverter.c +libcpukit_a_SOURCES += sapi/src/delaynano.c +libcpukit_a_SOURCES += sapi/src/delayticks.c +libcpukit_a_SOURCES += sapi/src/exinit.c +libcpukit_a_SOURCES += sapi/src/exshutdown.c +libcpukit_a_SOURCES += sapi/src/extension.c +libcpukit_a_SOURCES += sapi/src/extensioncreate.c +libcpukit_a_SOURCES += sapi/src/extensiondelete.c +libcpukit_a_SOURCES += sapi/src/extensionident.c +libcpukit_a_SOURCES += sapi/src/fatal.c +libcpukit_a_SOURCES += sapi/src/fatalsrctext.c +libcpukit_a_SOURCES += sapi/src/getversionstring.c +libcpukit_a_SOURCES += sapi/src/interrtext.c +libcpukit_a_SOURCES += sapi/src/io.c +libcpukit_a_SOURCES += sapi/src/ioclose.c +libcpukit_a_SOURCES += sapi/src/iocontrol.c +libcpukit_a_SOURCES += sapi/src/ioinitialize.c +libcpukit_a_SOURCES += sapi/src/ioopen.c +libcpukit_a_SOURCES += sapi/src/ioread.c +libcpukit_a_SOURCES += sapi/src/ioregisterdriver.c +libcpukit_a_SOURCES += sapi/src/iounregisterdriver.c +libcpukit_a_SOURCES += sapi/src/iowrite.c +libcpukit_a_SOURCES += sapi/src/panic.c +libcpukit_a_SOURCES += sapi/src/posixapi.c +libcpukit_a_SOURCES += sapi/src/profilingiterate.c +libcpukit_a_SOURCES += sapi/src/profilingreportxml.c +libcpukit_a_SOURCES += sapi/src/rbheap.c +libcpukit_a_SOURCES += sapi/src/rbtree.c +libcpukit_a_SOURCES += sapi/src/rbtreefind.c +libcpukit_a_SOURCES += sapi/src/sapirbtreeinsert.c +libcpukit_a_SOURCES += sapi/src/tcsimpleinstall.c +libcpukit_a_SOURCES += sapi/src/version.c + +# +# Create a new Version VC Key header if the VC state has changed. +# +stamp_vc_key = stamp-vc-key + +BUILT_SOURCES = version-vc-key.h + +.PHONY: generate-vc-key + +generate-vc-key: + @+current_vc_key=""; \ + if test -f $(stamp_vc_key); then \ + current_vc_key=`cat $(stamp_vc_key)`; \ + fi; \ + vc_key=`$(top_srcdir)/vc-key.sh $(top_srcdir) $$current_vc_key`; \ + if test "$$vc_key" != "matches"; then \ + echo "Generating version-vc-key.h"; \ + if test "$$vc_key" == "release"; then \ + vc_header_key="\/\* No version control key found; release\? \*\/"; \ + else \ + vc_header_key="#define RTEMS_VERSION_VC_KEY \"$$vc_key\""; \ + fi; \ + cat $(top_srcdir)/version-vc-key.h.in | \ + sed -e "s/@VERSION_VC_KEY@/$$vc_header_key/g" > version-vc-key.h; \ + echo "$$vc_key" > $(stamp_vc_key); \ + fi + +version-vc-key.h: generate-vc-key + +$(top_srcdir)/sapi/src/version.c: version-vc-key.h + +all-local: generate-vc-key + # librtemscpu -_SUBDIRS = . score rtems sapi posix +_SUBDIRS = . score rtems posix _SUBDIRS += dev _SUBDIRS += dtc/libfdt _SUBDIRS += libcrypt diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 1809973afe..782ed50a2e 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -477,7 +477,6 @@ Makefile dev/Makefile dtc/libfdt/Makefile rtems/Makefile -sapi/Makefile score/Makefile score/cpu/Makefile score/cpu/arm/Makefile diff --git a/cpukit/sapi/Makefile.am b/cpukit/sapi/Makefile.am deleted file mode 100644 index 0fef05de7d..0000000000 --- a/cpukit/sapi/Makefile.am +++ /dev/null @@ -1,63 +0,0 @@ -include $(top_srcdir)/automake/multilib.am -include $(top_srcdir)/automake/compile.am - - -noinst_LIBRARIES = libsapi.a -libsapi_a_SOURCES = src/extension.c src/extensioncreate.c \ - src/extensiondelete.c src/extensionident.c src/fatal.c src/exinit.c \ - src/exshutdown.c src/io.c src/ioclose.c src/iocontrol.c \ - src/ioinitialize.c src/ioopen.c src/ioread.c src/ioregisterdriver.c \ - src/iounregisterdriver.c src/iowrite.c src/posixapi.c \ - src/getversionstring.c \ - src/chainappendnotify.c src/chaingetnotify.c src/chaingetwait.c \ - src/chainprependnotify.c src/rbheap.c src/interrtext.c \ - src/fatalsrctext.c src/version.c -libsapi_a_SOURCES += src/chainprotected.c -libsapi_a_SOURCES += src/cpucounterconverter.c -libsapi_a_SOURCES += src/delayticks.c -libsapi_a_SOURCES += src/delaynano.c -libsapi_a_SOURCES += src/rbtree.c -libsapi_a_SOURCES += src/rbtreefind.c -libsapi_a_SOURCES += src/sapirbtreeinsert.c -libsapi_a_SOURCES += src/panic.c -libsapi_a_SOURCES += src/profilingiterate.c -libsapi_a_SOURCES += src/profilingreportxml.c -libsapi_a_SOURCES += src/tcsimpleinstall.c -libsapi_a_CPPFLAGS = $(AM_CPPFLAGS) - -# -# Create a new Version VC Key header if the VC state has changed. -# -vc_key_stamp = $(am__leading_dot)vc-key-stamp - -libsapi_a_CPPFLAGS += -I. - -BUILT_SOURCES = version-vc-key.h - -.PHONY: generate-vc-key - -generate-vc-key: - @+current_vc_key=""; \ - if test -f $(vc_key_stamp); then \ - current_vc_key=`cat $(vc_key_stamp)`; \ - fi; \ - vc_key=`$(top_srcdir)/sapi/vc-key.sh $(top_srcdir) $$current_vc_key`; \ - if test "$$vc_key" != "matches"; then \ - echo "Generating version-vc-key.h"; \ - if test "$$vc_key" == "release"; then \ - vc_header_key="\/\* No version control key found; release\? \*\/"; \ - else \ - vc_header_key="#define RTEMS_VERSION_VC_KEY \"$$vc_key\""; \ - fi; \ - cat $(top_srcdir)/sapi/version-vc-key.h.in | \ - sed -e "s/@VERSION_VC_KEY@/$$vc_header_key/g" > version-vc-key.h; \ - echo "$$vc_key" > $(vc_key_stamp); \ - fi - -version-vc-key.h: generate-vc-key - -$(srcdir)/src/version.c: version-vc-key.h - -all-local: generate-vc-key - -include $(top_srcdir)/automake/local.am diff --git a/cpukit/sapi/vc-key.sh b/cpukit/sapi/vc-key.sh deleted file mode 100755 index 3c8f446d3f..0000000000 --- a/cpukit/sapi/vc-key.sh +++ /dev/null @@ -1,39 +0,0 @@ -#! /bin/sh - -git=$(command -v git) - -# -# Git command not found or not a valid git repo is a release. -# -vc_ident="release" - -if test $# -ge 1; then - repo=$1 - shift - if test -d $repo; then - cwd=$(pwd) - cd $repo - if test -n ${git}; then - git rev-parse --git-dir > /dev/null 2>&1 - if test $? = 0; then - git status > /dev/null 2>&1 - if git diff-index --quiet HEAD --; then - modified="" - else - modified="-modified" - fi - vc_ident="$(git rev-parse --verify HEAD)${modified}" - if test $# -ge 1; then - if test "${vc_ident}" = "$1"; then - vc_ident="matches" - fi - fi - fi - fi - cd $cwd - fi -fi - -echo ${vc_ident} - -exit 0 diff --git a/cpukit/sapi/version-vc-key.h.in b/cpukit/sapi/version-vc-key.h.in deleted file mode 100644 index 738e24d19d..0000000000 --- a/cpukit/sapi/version-vc-key.h.in +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated. Do not edit. - */ -#if !defined(_RTEMS_VERSION_VC_KEY_H_) -#define _RTEMS_VERSION_VC_KEY_H_ -@VERSION_VC_KEY@ -#endif diff --git a/cpukit/vc-key.sh b/cpukit/vc-key.sh new file mode 100755 index 0000000000..3c8f446d3f --- /dev/null +++ b/cpukit/vc-key.sh @@ -0,0 +1,39 @@ +#! /bin/sh + +git=$(command -v git) + +# +# Git command not found or not a valid git repo is a release. +# +vc_ident="release" + +if test $# -ge 1; then + repo=$1 + shift + if test -d $repo; then + cwd=$(pwd) + cd $repo + if test -n ${git}; then + git rev-parse --git-dir > /dev/null 2>&1 + if test $? = 0; then + git status > /dev/null 2>&1 + if git diff-index --quiet HEAD --; then + modified="" + else + modified="-modified" + fi + vc_ident="$(git rev-parse --verify HEAD)${modified}" + if test $# -ge 1; then + if test "${vc_ident}" = "$1"; then + vc_ident="matches" + fi + fi + fi + fi + cd $cwd + fi +fi + +echo ${vc_ident} + +exit 0 diff --git a/cpukit/version-vc-key.h.in b/cpukit/version-vc-key.h.in new file mode 100644 index 0000000000..738e24d19d --- /dev/null +++ b/cpukit/version-vc-key.h.in @@ -0,0 +1,7 @@ +/* + * Automatically generated. Do not edit. + */ +#if !defined(_RTEMS_VERSION_VC_KEY_H_) +#define _RTEMS_VERSION_VC_KEY_H_ +@VERSION_VC_KEY@ +#endif diff --git a/cpukit/wrapup/Makefile.am b/cpukit/wrapup/Makefile.am index c69cfedecb..9555153d64 100644 --- a/cpukit/wrapup/Makefile.am +++ b/cpukit/wrapup/Makefile.am @@ -17,7 +17,7 @@ TMP_LIBS += ../dev/libdev.a TMP_LIBS += ../dtc/libfdt/libfdt.a TMP_LIBS += ../score/cpu/@RTEMS_CPU@/libscorecpu.a TMP_LIBS += ../score/libscore.a -TMP_LIBS += ../sapi/libsapi.a +TMP_LIBS += ../libcpukit.a TMP_LIBS += ../rtems/librtems.a TMP_LIBS += ../posix/libposix.a -- cgit v1.2.3