diff options
author | Taylor Hutt <thutt@chromium.org> | 2012-02-23 09:33:34 -0800 |
---|---|---|
committer | Taylor Hutt <thutt@chromium.org> | 2012-02-23 11:00:13 -0800 |
commit | bbca6ef87327e7c83b6b9763061c774aa9fdfcf8 (patch) | |
tree | 12aa26c284d44ff1983d3c6bd47194e2ea2147fb | |
parent | 822e137ab10b578727f92a7df8b562f39d0562dd (diff) | |
download | adhd-bbca6ef87327e7c83b6b9763061c774aa9fdfcf8.tar.gz |
ADHD: Incorporate 'cras' to build process
Details
Modify the ADHD build process to build & install cras.
The ADHD ebuild is having two separate changes applied:
o include prerequisite of 'speex'
o install being rewritten to use ADHD build 'install' target
This change does the following:
- Makefile
Added rules to call to the 'cras' build & install.
Also added a little verbosity to the installation of system
files.
o cras/Makefile.am, cras/configure.ac, cras/git_prepare.sh
Added copyright header.
o cras/cras.mk
A small Makefile called by the master Makefile. This file
has two targets: 'cras' and 'cras_install'; the former builds
cras, while the later installs into DESTDIR.
BUG=chromium-os:19558
TEST=See above.
Change-Id: I65c50bf87e2130774196a6e0b2ad2a58dfada707
Signed-off-by: Taylor Hutt <thutt@chromium.org>
-rw-r--r-- | Makefile | 19 | ||||
-rw-r--r-- | cras/Makefile.am | 3 | ||||
-rw-r--r-- | cras/configure.ac | 3 | ||||
-rw-r--r-- | cras/cras.mk | 25 | ||||
-rwxr-xr-x | cras/git_prepare.sh | 3 | ||||
-rw-r--r-- | defs/make.mk | 10 |
6 files changed, 53 insertions, 10 deletions
@@ -8,27 +8,36 @@ endif export ADHD_DIR = $(shell pwd) include $(ADHD_DIR)/defs/definitions.mk -all: gavd adhdinfo +all: gavd adhdinfo cras adhdinfo gavd:: lib lib gavd adhdinfo:: - @$(call remake,Building,$@,$@) + @$(call remake,Building,$@,Makefile,$@) + +cras: + @$(call remake,Building,$@,cras.mk,$@) + +cras_install: + @$(call remake,Building,cras,cras.mk,$@) $(DESTDIR)/etc/init/adhd.conf: $(ADHD_DIR)/upstart/adhd.conf + $(ECHO) "Installing '$<' to '$@'" $(INSTALL) -D $< $@ $(DESTDIR)/usr/bin/gavd: $(ADHD_BUILD_DIR)/gavd/gavd + $(ECHO) "Installing '$<' to '$@'" $(INSTALL) -D $< $@ $(DESTDIR)/etc/asound.state: $(ADHD_DIR)/factory-default/asound.state.$(BOARD) + $(ECHO) "Installing '$<' to '$@'" $(INSTALL) -D $< $@ install: $(DESTDIR)/etc/init/adhd.conf \ $(DESTDIR)/etc/asound.state \ - $(DESTDIR)/usr/bin/gavd - + $(DESTDIR)/usr/bin/gavd \ + cras_install clean: @rm -rf $(ADHD_BUILD_DIR) -.PHONY: gavd clean adhdinfo lib +.PHONY: gavd clean adhdinfo lib cras cras_install diff --git a/cras/Makefile.am b/cras/Makefile.am index a5afe635..6ecfbaec 100644 --- a/cras/Makefile.am +++ b/cras/Makefile.am @@ -1,3 +1,6 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. AUTOMAKE_OPTIONS = foreign SUBDIRS = src pkgconfigdir = $(libdir)/pkgconfig diff --git a/cras/configure.ac b/cras/configure.ac index 4dbb8148..5d6cbfac 100644 --- a/cras/configure.ac +++ b/cras/configure.ac @@ -1,3 +1,6 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. AC_INIT([cras], [0.1], [dgreid@chromium.org], [cras], [http://www.chromium.org/]) AC_PREREQ([2.59]) diff --git a/cras/cras.mk b/cras/cras.mk new file mode 100644 index 00000000..0ad9e949 --- /dev/null +++ b/cras/cras.mk @@ -0,0 +1,25 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +#include $(ADHD_DIR)/defs/definitions.mk +CWARN= +CFLAGS= + +cras: + (cd $(ADHD_DIR)/cras && \ + $(ADHD_DIR)/cras/git_prepare.sh && \ + $(ADHD_DIR)/cras/configure \ + --build=$(CBUILD) \ + --host=$(CHOST) \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --datadir=/usr/share \ + --sysconfdir=/etc \ + --localstatedir=/var/lib && \ + $(MAKE) -f $(ADHD_DIR)/cras/Makefile) + +cras_install: + (cd $(ADHD_DIR)/cras && \ + $(MAKE) -f $(ADHD_DIR)/cras/Makefile install) + diff --git a/cras/git_prepare.sh b/cras/git_prepare.sh index 37da89ab..d53eb064 100755 --- a/cras/git_prepare.sh +++ b/cras/git_prepare.sh @@ -1,2 +1,5 @@ +# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. #!/bin/sh libtoolize && aclocal && autoconf && automake --add-missing diff --git a/defs/make.mk b/defs/make.mk index 9d87fa75..68369d84 100644 --- a/defs/make.mk +++ b/defs/make.mk @@ -29,10 +29,10 @@ mkdir = [ ! -d $(1) ] && \ # then build the first argument by recursively invoking make. # The recursive make is performed in the build directory. # -# $(call remake,<label>,<subdirectory>,<target>) +# $(call remake,<label>,<subdirectory>,<makefile>,<target>) # -# ex: @$(call remake,Building,gavd,gavd) -# $(1) $(2) $(3) +# ex: @$(call remake,Building,gavd,Makefile,gavd) +# $(1) $(2) $(3) $(4) # # REL_DIR: # @@ -61,9 +61,9 @@ remake = \ $(call mkdir,$(ADHD_BUILD_DIR)/$${REL_DIR}) && \ $(MESSAGE) "$(1) $${REL_DIR}"; \ $(MAKE) $(SILENT) \ - -f $(ADHD_DIR)/$${REL_DIR}/Makefile \ + -f $(ADHD_DIR)/$${REL_DIR}/$(3) \ -C $(ADHD_BUILD_DIR)/$${REL_DIR} \ VPATH=$(ADHD_DIR)/$${REL_DIR} \ ADHD_SOURCE_DIR=$(ADHD_DIR)/$${REL_DIR} \ THIS_BUILD_DIR=$(ADHD_BUILD_DIR)/$${REL_DIR} \ - $(3)) + $(4)) |