summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2012-07-26 15:46:18 -0700
committerGerrit <chrome-bot@google.com>2012-07-26 22:13:21 -0700
commit7817270d93d1224505192bb1ad370da1b8e2dfc6 (patch)
treea5fe6ae8d84e3ce2a806a00bab04718ab2953377 /Makefile
parentf3c2319a64e6d5d0d00c4be524552dc45a835898 (diff)
downloadadhd-7817270d93d1224505192bb1ad370da1b8e2dfc6.tar.gz
Only require an asound.state.$(BOARD) file if non-empty
Currently, every new board must create a file factory-default/asound.state.$(BOARD) , even if empty, in order to successfully build adhd. This adds another step to the bring-up process for a board, and makes life more difficult for people creating private board overlays. Automatically install an empty asound.state file if no board-specific file exists. BUG=chromium-os:32997 TEST=Build with a board that does not have an asound.state.$(BOARD) file Change-Id: I06fa1d1b0be3fd1025f69468ced3a4a380327784 Reviewed-on: https://gerrit.chromium.org/gerrit/28537 Tested-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Dylan Reid <dgreid@chromium.org> Commit-Ready: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5ed2877e..e795ba92 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,15 @@ $(DESTDIR)/etc/init/cras.conf: $(ADHD_DIR)/upstart/cras.conf
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@
-$(DESTDIR)/etc/asound.state: $(ADHD_DIR)/factory-default/asound.state.$(BOARD)
+optional_asound_state := $(wildcard $(ADHD_DIR)/factory-default/asound.state.$(BOARD))
+
+ifneq ($(strip $(optional_asound_state)),)
+asound_state := $(ADHD_DIR)/factory-default/asound.state.$(BOARD)
+else
+asound_state := $(ADHD_DIR)/factory-default/asound.state.empty
+endif
+
+$(DESTDIR)/etc/asound.state: $(asound_state)
$(ECHO) "Installing '$<' to '$@'"
$(INSTALL) --mode 644 -D $< $@