diff options
author | Josh Triplett <josh@joshtriplett.org> | 2012-07-26 15:46:18 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-26 22:13:21 -0700 |
commit | 7817270d93d1224505192bb1ad370da1b8e2dfc6 (patch) | |
tree | a5fe6ae8d84e3ce2a806a00bab04718ab2953377 /Makefile | |
parent | f3c2319a64e6d5d0d00c4be524552dc45a835898 (diff) | |
download | adhd-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-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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 $< $@ |