[Sound-open-firmware] [PATCH] build: fix install and dist build targets.

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Jan 10 18:38:56 CET 2018


Make install/dist were missing some headers files and dirs. Add them and
make sure version generation works for building from the dist directory
where there is no git versioning information available.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 Makefile.am                                        |  9 ++--
 configure.ac                                       |  8 ++-
 git-version.sh                                     | 24 ---------
 src/Makefile.am                                    |  2 +-
 src/arch/xtensa/Makefile.am                        |  5 +-
 src/arch/xtensa/hal/Makefile.am                    |  2 +-
 src/arch/xtensa/include/Makefile.am                | 13 +----
 src/arch/xtensa/include/arch/Makefile.am           |  7 +++
 src/arch/xtensa/include/xtensa/Makefile.am         | 33 ++++++++++++
 src/arch/xtensa/include/xtensa/config/Makefile.am  |  2 +
 src/arch/xtensa/xtos/Makefile.am                   | 11 +++-
 src/audio/Makefile.am                              |  8 +++
 src/include/Makefile.am                            |  7 +++
 src/include/reef/Makefile.am                       |  4 +-
 src/include/reef/audio/Makefile.am                 |  5 +-
 src/include/reef/audio/coefficients/Makefile.am    |  1 +
 .../reef/audio/coefficients/src/Makefile.am        | 58 ++++++++++++++++++++++
 src/include/reef/math/Makefile.am                  |  3 ++
 src/platform/baytrail/Makefile.am                  |  2 +
 .../baytrail/include/xtensa/config/Makefile.am     |  2 +
 version.sh                                         | 39 +++++++++++++++
 21 files changed, 195 insertions(+), 50 deletions(-)
 delete mode 100755 git-version.sh
 create mode 100644 src/arch/xtensa/include/arch/Makefile.am
 create mode 100644 src/arch/xtensa/include/xtensa/Makefile.am
 create mode 100644 src/arch/xtensa/include/xtensa/config/Makefile.am
 create mode 100644 src/include/reef/audio/coefficients/Makefile.am
 create mode 100644 src/include/reef/audio/coefficients/src/Makefile.am
 create mode 100644 src/include/reef/math/Makefile.am
 create mode 100755 version.sh

diff --git a/Makefile.am b/Makefile.am
index 362e2bd..c05f042 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,8 @@ SUBDIRS = src
 
 ACLOCAL_AMFLAGS = -I m4
 
+EXTRA_DIST = version.sh
+
 SRC_DIR = $(abs_top_builddir)/src
 
 export REEF_INCDIR = \
@@ -15,13 +17,8 @@ export ARCH_INCDIR = \
 export PLATFORM_INCDIR = \
 	-I $(SRC_DIR)/platform/$(PLATFORM)/include
 
-BUILT_SOURCES = $(top_srcdir)/src/include/version.h
-
-$(top_srcdir)/src/include/version.h: Makefile
-	./git-version.sh
-
 dist-hook:
-	./git-version.sh
+	./version.sh $(top_srcdir)
 	cat .version > $(distdir)/.tarball-version
 	cat .version > $(distdir)/.version
 
diff --git a/configure.ac b/configure.ac
index 44ede24..5ade40b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ([2.69])
-AC_INIT([Reef],[m4_esyscmd(./git-version.sh)],[sound-open-firmware at alsa-project.org])
+AC_INIT([Reef],[m4_esyscmd(./version.sh)],[sound-open-firmware at alsa-project.org])
 AC_CONFIG_SRCDIR([src/init/init.c])
 AC_CONFIG_HEADERS([src/include/config.h])
 AC_CONFIG_MACRO_DIRS([m4])
@@ -154,6 +154,9 @@ AC_CONFIG_FILES([
 	src/arch/Makefile
 	src/arch/xtensa/Makefile
 	src/arch/xtensa/include/Makefile
+	src/arch/xtensa/include/arch/Makefile
+	src/arch/xtensa/include/xtensa/Makefile
+	src/arch/xtensa/include/xtensa/config/Makefile
 	src/arch/xtensa/hal/Makefile
 	src/arch/xtensa/xtos/Makefile
 	src/audio/Makefile
@@ -162,6 +165,9 @@ AC_CONFIG_FILES([
 	src/include/Makefile
 	src/include/reef/Makefile
 	src/include/reef/audio/Makefile
+	src/include/reef/audio/coefficients/Makefile
+	src/include/reef/audio/coefficients/src/Makefile
+	src/include/reef/math/Makefile
 	src/include/uapi/Makefile
 	src/ipc/Makefile
 	src/lib/Makefile
diff --git a/git-version.sh b/git-version.sh
deleted file mode 100755
index 1c2d275..0000000
--- a/git-version.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-
-# version for configure
-# echo -n `git describe --abbrev=4`
-
-# version for make dist
-git describe --abbrev=4 > .version
-git describe --abbrev=4 > .tarball-version
-
-# git commit for IPC
-echo "#define REEF_TAG \"`git log --pretty=format:\"%h\" -1 | cut -c1-5`\"" > src/include/version.h
-
-# build counter
-if [ -e .build ]; then
-	num=$((`cat .build` + 1))
-else
-	num=0
-fi
-
-# save and insert build counter
-echo $num > .build
-echo "#define REEF_BUILD $num" >> src/include/version.h
-
-#echo version for AC_INIT
-echo -n `cat .version | cut -dv -f2 | cut -d. -f1`:`cat .version | cut -d. -f2 | cut -d- -f1`
diff --git a/src/Makefile.am b/src/Makefile.am
index c2cc8f1..fb82330 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1 +1 @@
-SUBDIRS = init math audio platform tasks drivers ipc lib arch
+SUBDIRS = include init math audio platform tasks drivers ipc lib arch
diff --git a/src/arch/xtensa/Makefile.am b/src/arch/xtensa/Makefile.am
index 828db91..00f6b68 100644
--- a/src/arch/xtensa/Makefile.am
+++ b/src/arch/xtensa/Makefile.am
@@ -1,6 +1,6 @@
 SUBDIRS = hal xtos include
 
-bin_PROGRAMS = \
+noinst_PROGRAMS = \
 	reef
 
 # generate linker script from platform headers
@@ -79,3 +79,6 @@ vminstall-local:
 
 clean-local:
 	rm -f reef-*.bin
+	rm -fr *.lst
+	rm -fr *.map
+	rm -fr *.dis
diff --git a/src/arch/xtensa/hal/Makefile.am b/src/arch/xtensa/hal/Makefile.am
index ad87877..e1e7a80 100644
--- a/src/arch/xtensa/hal/Makefile.am
+++ b/src/arch/xtensa/hal/Makefile.am
@@ -134,7 +134,7 @@ PLATFORM_DEFS = \
 	$(CACHE_DEFS)
 endif
 
-lib_LIBRARIES = libhal.a
+noinst_LIBRARIES = libhal.a
 
 libhal_a_SOURCES = \
 	attribute.c \
diff --git a/src/arch/xtensa/include/Makefile.am b/src/arch/xtensa/include/Makefile.am
index f114582..b2e07bf 100644
--- a/src/arch/xtensa/include/Makefile.am
+++ b/src/arch/xtensa/include/Makefile.am
@@ -1,12 +1 @@
-noinst_HEADERS = \
-	xtensa/cacheasm.h \
-	xtensa/coreasm.h \
-	xtensa/corebits.h \
-	xtensa/hal.h \
-	xtensa/xtensa-xer.h \
-	xtensa/config/core.h \
-	arch/interrupt.h \
-	arch/reef.h \
-	arch/spinlock.h \
-	arch/timer.h \
-	arch/task.h
+SUBDIRS = arch xtensa
diff --git a/src/arch/xtensa/include/arch/Makefile.am b/src/arch/xtensa/include/arch/Makefile.am
new file mode 100644
index 0000000..d8ba0df
--- /dev/null
+++ b/src/arch/xtensa/include/arch/Makefile.am
@@ -0,0 +1,7 @@
+noinst_HEADERS = \
+	cache.h \
+	interrupt.h \
+	reef.h \
+	spinlock.h \
+	task.h \
+	timer.h
diff --git a/src/arch/xtensa/include/xtensa/Makefile.am b/src/arch/xtensa/include/xtensa/Makefile.am
new file mode 100644
index 0000000..8fd532d
--- /dev/null
+++ b/src/arch/xtensa/include/xtensa/Makefile.am
@@ -0,0 +1,33 @@
+noinst_HEADERS = \
+	board.h \
+	config \
+	hal.h \
+	overlay.h \
+	trax-api.h \
+	trax-proto.h \
+	xdm-regs.h \
+	xtensa-versions.h \
+	xtruntime.h \
+	c6x-compat.h \
+	coreasm.h \
+	overlay_os_asm.h \
+	trax-core-config.h \
+	traxreg.h \
+	xmon.h \
+	xtensa-xer.h \
+	cacheasm.h \
+	corebits.h \
+	simboard.h \
+	traxfile.h \
+	trax-util.h \
+	xtbsp.h \
+	xtruntime-core-state.h \
+	cacheattrasm.h \
+	core-macros.h  \
+	specreg.h \
+	trax.h \
+	uart-16550.h \
+	xtensa-libdb-macros.h \
+	xtruntime-frames.h
+
+SUBDIRS = config
diff --git a/src/arch/xtensa/include/xtensa/config/Makefile.am b/src/arch/xtensa/include/xtensa/config/Makefile.am
new file mode 100644
index 0000000..69f1b8a
--- /dev/null
+++ b/src/arch/xtensa/include/xtensa/config/Makefile.am
@@ -0,0 +1,2 @@
+noinst_HEADERS = \
+	core.h
diff --git a/src/arch/xtensa/xtos/Makefile.am b/src/arch/xtensa/xtos/Makefile.am
index 6bf882e..9fff986 100644
--- a/src/arch/xtensa/xtos/Makefile.am
+++ b/src/arch/xtensa/xtos/Makefile.am
@@ -1,4 +1,11 @@
-lib_LIBRARIES = \
+noinst_HEADERS = \
+	xtos-internal.h \
+	xtos-params.h \
+	interrupt-pri.h \
+	window-vectors-new.S \
+	int-medpri-dispatcher.S
+
+noinst_LIBRARIES = \
 	libxtos.a \
 	libxlevel2.a \
 	libxlevel3.a \
@@ -26,7 +33,7 @@ endif
 
 if BUILD_APOLLOLAKE
 PLATFORM_DEFS = $(VECTOR_DEFS)
-lib_LIBRARIES += libxlevel6.a
+noinst_LIBRARIES += libxlevel6.a
 VECTOR_DEFS += -D__SPLIT__level6
 endif
 
diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am
index 285422e..d19dff7 100644
--- a/src/audio/Makefile.am
+++ b/src/audio/Makefile.am
@@ -1,5 +1,13 @@
 noinst_LIBRARIES = libaudio.a
 
+noinst_HEADERS = \
+	eq_fir.h \
+	eq_iir.h \
+	fir.h \
+	iir.h \
+	src_config.h \
+	src_core.h
+
 libaudio_a_SOURCES = \
 	eq_iir.c \
 	iir.c \
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index 49f8bbf..a42403b 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -1 +1,8 @@
 SUBDIRS = reef uapi
+
+version.h:
+	$(top_srcdir)/version.sh $(top_srcdir)
+
+noinst_HEADERS = \
+	config.h \
+	version.h
diff --git a/src/include/reef/Makefile.am b/src/include/reef/Makefile.am
index f690e2a..3f90e90 100644
--- a/src/include/reef/Makefile.am
+++ b/src/include/reef/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = audio
+SUBDIRS = audio math
 
 noinst_HEADERS = \
 	alloc.h \
@@ -6,8 +6,10 @@ noinst_HEADERS = \
 	dai.h \
 	debug.h \
 	dma.h \
+	dma-trace.h \
 	dw-dma.h \
 	init.h \
+	intel-ipc.h \
 	interrupt.h \
 	interrupt-map.h \
 	io.h \
diff --git a/src/include/reef/audio/Makefile.am b/src/include/reef/audio/Makefile.am
index b02684c..60b7145 100644
--- a/src/include/reef/audio/Makefile.am
+++ b/src/include/reef/audio/Makefile.am
@@ -1,4 +1,7 @@
+SUBDIRS = coefficients
+
 noinst_HEADERS = \
 	component.h \
 	pipeline.h \
-	buffer.h
+	buffer.h \
+	format.h
diff --git a/src/include/reef/audio/coefficients/Makefile.am b/src/include/reef/audio/coefficients/Makefile.am
new file mode 100644
index 0000000..af437a6
--- /dev/null
+++ b/src/include/reef/audio/coefficients/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = src
diff --git a/src/include/reef/audio/coefficients/src/Makefile.am b/src/include/reef/audio/coefficients/src/Makefile.am
new file mode 100644
index 0000000..ca30972
--- /dev/null
+++ b/src/include/reef/audio/coefficients/src/Makefile.am
@@ -0,0 +1,58 @@
+noinst_HEADERS = \
+	src_small_int24_1_2_4375_5000.h \
+	src_small_int24_1_3_2188_5000.h \
+	src_small_int24_1_3_4375_5000.h \
+	src_small_int24_20_21_4020_5000.h \
+	src_small_int24_21_20_4020_5000.h \
+	src_small_int24_2_1_4375_5000.h \
+	src_small_int24_2_3_4375_5000.h \
+	src_small_int24_3_1_2188_5000.h \
+	src_small_int24_3_1_4375_5000.h \
+	src_small_int24_3_2_4375_5000.h \
+	src_small_int24_7_8_4375_5000.h \
+	src_small_int24_8_7_4375_5000.h \
+	src_small_int24_define.h \
+	src_small_int24_table.h \
+	src_std_int24_10_21_4375_5000.h \
+	src_std_int24_10_9_4375_5000.h \
+	src_std_int24_1_2_2188_5000.h \
+	src_std_int24_1_2_4375_5000.h \
+	src_std_int24_1_3_2188_5000.h \
+	src_std_int24_1_3_4375_5000.h \
+	src_std_int24_16_7_3938_5000.h \
+	src_std_int24_20_21_4020_5000.h \
+	src_std_int24_20_7_2871_5000.h \
+	src_std_int24_21_20_4020_5000.h \
+	src_std_int24_2_1_2188_5000.h \
+	src_std_int24_21_40_3828_5000.h \
+	src_std_int24_2_1_4375_5000.h \
+	src_std_int24_21_80_3828_5000.h \
+	src_std_int24_2_3_4375_5000.h \
+	src_std_int24_3_1_2188_5000.h \
+	src_std_int24_3_1_4375_5000.h \
+	src_std_int24_32_21_4375_5000.h \
+	src_std_int24_3_2_4375_5000.h \
+	src_std_int24_3_4_4375_5000.h \
+	src_std_int24_40_21_3828_5000.h \
+	src_std_int24_4_3_4375_5000.h \
+	src_std_int24_5_7_4375_5000.h \
+	src_std_int24_7_8_4375_5000.h \
+	src_std_int24_8_21_3125_5000.h\
+	src_std_int24_8_7_2381_5000.h \
+	src_std_int24_8_7_4375_5000.h \
+	src_std_int24_define.h \
+	src_std_int24_table.h \
+	src_tiny_int16_1_2_3750_5100.h \
+	src_tiny_int16_1_3_1875_5100.h \
+	src_tiny_int16_1_3_3750_5100.h \
+	src_tiny_int16_20_21_3445_5100.h \
+	src_tiny_int16_21_20_3445_5100.h \
+	src_tiny_int16_2_1_3750_5100.h \
+	src_tiny_int16_2_3_3750_5100.h \
+	src_tiny_int16_3_1_1875_5100.h \
+	src_tiny_int16_3_1_3750_5100.h \
+	src_tiny_int16_3_2_3750_5100.h \
+	src_tiny_int16_7_8_3750_5100.h \
+	src_tiny_int16_8_7_3750_5100.h \
+	src_tiny_int16_define.h \
+	src_tiny_int16_table.h
diff --git a/src/include/reef/math/Makefile.am b/src/include/reef/math/Makefile.am
new file mode 100644
index 0000000..fcd1d2f
--- /dev/null
+++ b/src/include/reef/math/Makefile.am
@@ -0,0 +1,3 @@
+noinst_HEADERS = \
+	numbers.h \
+	trig.h
diff --git a/src/platform/baytrail/Makefile.am b/src/platform/baytrail/Makefile.am
index bf9d40a..05b1235 100644
--- a/src/platform/baytrail/Makefile.am
+++ b/src/platform/baytrail/Makefile.am
@@ -1,5 +1,7 @@
 SUBDIRS = include
 
+EXTRA_DIST = baytrail.x.in
+
 noinst_LIBRARIES = libplatform.a
 
 libplatform_a_SOURCES = \
diff --git a/src/platform/baytrail/include/xtensa/config/Makefile.am b/src/platform/baytrail/include/xtensa/config/Makefile.am
index 99c21a5..c68949b 100644
--- a/src/platform/baytrail/include/xtensa/config/Makefile.am
+++ b/src/platform/baytrail/include/xtensa/config/Makefile.am
@@ -1,5 +1,7 @@
 noinst_HEADERS = \
 	core-isa.h \
+	core-isa-byt.h \
+	core-isa-cht.h \
 	core-matmap.h \
 	defs.h \
 	specreg.h \
diff --git a/version.sh b/version.sh
new file mode 100755
index 0000000..fb5f3e4
--- /dev/null
+++ b/version.sh
@@ -0,0 +1,39 @@
+
+# version for configure, make dist and FW etc
+# usage "version.sh dir"
+# Where dir is the top level directory path.
+
+# use pwd is no path argument is given
+if [ $# -eq 0 ]; then
+	DIR=`pwd`
+else
+	DIR=$1
+fi
+
+# create git version if we are a git repo
+if [ ! -d $DIR/.git ]; then
+#	 version for make dist
+	git describe --abbrev=4 > $DIR/.version
+	git describe --abbrev=4 > $DIR/.tarball-version
+
+	# git commit for IPC
+	echo "#define REEF_TAG \"`git log --pretty=format:\"%h\" -1 | cut -c1-5`\"" > $DIR/src/include/version.h
+else
+	echo "#define REEF_TAG 0" > $DIR/src/include/version.h
+fi
+
+# build counter
+if [ -e $DIR/.build ]; then
+	num=$((`cat $DIR/.build` + 1))
+else
+	num=0
+fi
+
+# save and insert build counter
+echo $num > $DIR/.build
+echo "#define REEF_BUILD $num" >> $DIR/src/include/version.h
+
+#echo version for AC_INIT
+if [ -e $DIR/.version ]; then
+	echo -n `cat $DIR/.version | cut -dv -f2 | cut -d. -f1`.`cat $DIR/.version | cut -d. -f2 | cut -d- -f1`
+fi
-- 
2.14.1



More information about the Sound-open-firmware mailing list