Merge commit 'b1e7e97d3b60469b243b3b2e22c7d8cbd11c7c90'
[unleashed.git] / usr / src / cmd / hal / Makefile
blobe33bb919b3d2319516f6cdc3dcf04aff720a7206
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include ../Makefile.cmd
27 include Makefile.hal
29 SUBDIRS1 = hald hald-runner addons probing tools
30 SUBDIRS2 = fdi
31 SUBDIRS = $(SUBDIRS1) $(SUBDIRS2)
33 HAL_CONF = hal.conf
34 ROOT_DBUS_CONF_DIR = $(ROOT)/etc/dbus-1/system.d
35 ROOT_HAL_CONF = $(HAL_CONF:%=$(ROOT_DBUS_CONF_DIR)/%)
37 CLOBBERFILES += $(HAL_CONF)
39 all := TARGET= all
40 install := TARGET= install
41 clean := TARGET= clean
42 clobber := TARGET= clobber
44 $(ROOT_HAL_CONF) := FILEMODE = 644
46 .KEEP_STATE:
48 all: $(SUBDIRS) $(HAL_CONF)
50 clean clobber: $(SUBDIRS)
52 install: $(SUBDIRS) $(ROOT_HAL_CONF)
54 $(ROOT_DBUS_CONF_DIR):
55 $(INS.dir)
57 $(ROOT_HAL_CONF): $(ROOT_DBUS_CONF_DIR) $(HAL_CONF)
58 $(INS) -m $(FILEMODE) $(HAL_CONF) $@
60 $(HAL_CONF): $(HAL_CONF).in
61 $(SED) -e "s@\@HAL_USER\@@$(HAL_USER)@" \
62 < $(HAL_CONF).in > $(HAL_CONF)
64 $(SUBDIRS): FRC
65 @cd $@; pwd; $(MAKE) $(TARGET)
67 FRC:
69 include ../Makefile.targ