xref: /illumos-gate/usr/src/tools/onbld/Makefile (revision b4218d7f125d6b4ccd06bcb3545c78987e5bfbc8)
1cdf0c1d5Smjnelson#
2cdf0c1d5Smjnelson# CDDL HEADER START
3cdf0c1d5Smjnelson#
4cdf0c1d5Smjnelson# The contents of this file are subject to the terms of the
5cdf0c1d5Smjnelson# Common Development and Distribution License (the "License").
6cdf0c1d5Smjnelson# You may not use this file except in compliance with the License.
7cdf0c1d5Smjnelson#
8cdf0c1d5Smjnelson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9cdf0c1d5Smjnelson# or http://www.opensolaris.org/os/licensing.
10cdf0c1d5Smjnelson# See the License for the specific language governing permissions
11cdf0c1d5Smjnelson# and limitations under the License.
12cdf0c1d5Smjnelson#
13cdf0c1d5Smjnelson# When distributing Covered Code, include this CDDL HEADER in each
14cdf0c1d5Smjnelson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15cdf0c1d5Smjnelson# If applicable, add the following below this CDDL HEADER, with the
16cdf0c1d5Smjnelson# fields enclosed by brackets "[]" replaced with your own identifying
17cdf0c1d5Smjnelson# information: Portions Copyright [yyyy] [name of copyright owner]
18cdf0c1d5Smjnelson#
19cdf0c1d5Smjnelson# CDDL HEADER END
20cdf0c1d5Smjnelson#
21cdf0c1d5Smjnelson
22cdf0c1d5Smjnelson#
23*b4218d7fSMark J. Nelson# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24cdf0c1d5Smjnelson# Use is subject to license terms.
25cdf0c1d5Smjnelson#
26cdf0c1d5Smjnelson
27cdf0c1d5Smjnelsoninclude $(SRC)/Makefile.master
28cdf0c1d5Smjnelsoninclude ../Makefile.tools
29cdf0c1d5Smjnelson
30cdf0c1d5SmjnelsonSUBDIRS= \
31cdf0c1d5Smjnelson	Checks	\
32cdf0c1d5Smjnelson	hgext	\
33cdf0c1d5Smjnelson	Scm
34cdf0c1d5Smjnelson
35cdf0c1d5SmjnelsonPYSRCS= \
36cdf0c1d5Smjnelson	__init__.py
37cdf0c1d5Smjnelson
38cdf0c1d5SmjnelsonPYOBJS= $(PYSRCS:%.py=%.pyc)
39cdf0c1d5Smjnelson
40cdf0c1d5SmjnelsonPYFILES= $(PYSRCS) $(PYOBJS)
41cdf0c1d5Smjnelson
42cdf0c1d5Smjnelsonall := TARGET = all
43cdf0c1d5Smjnelsoninstall := TARGET = install
44cdf0c1d5Smjnelsonclean := TARGET = clean
45*b4218d7fSMark J. Nelsonclobber := TARGET = clobber
46cdf0c1d5Smjnelson
47cdf0c1d5SmjnelsonROOTONBLDBASEFILES=	$(PYFILES:%=$(ROOTONBLDLIBPY)/onbld/%)
48cdf0c1d5Smjnelson$(ROOTONBLDBASEFILES) := FILEMODE = 0444
49cdf0c1d5Smjnelson
50*b4218d7fSMark J. NelsonCLOBBERFILES += THIRDPARTYLICENSE
51*b4218d7fSMark J. Nelson
52cdf0c1d5Smjnelson.KEEP_STATE:
53cdf0c1d5Smjnelson
54*b4218d7fSMark J. Nelsonall: $(PYOBJS) $(SUBDIRS) THIRDPARTYLICENSE
55cdf0c1d5Smjnelson
56*b4218d7fSMark J. Nelsoninstall: all $(ROOTONBLDBASEFILES) $(SUBDIRS)
57cdf0c1d5Smjnelson
58*b4218d7fSMark J. Nelsonclean clobber: $(SUBDIRS)
59*b4218d7fSMark J. Nelson
60*b4218d7fSMark J. NelsonTHIRDPARTYLICENSE: $(SRC)/pkgdefs/license_files/lic_GPLv2
61*b4218d7fSMark J. Nelson	$(RM) $@
62*b4218d7fSMark J. Nelson	$(CAT) $? > $@
63cdf0c1d5Smjnelson
64cdf0c1d5Smjnelson$(ROOTONBLDLIBPY)/onbld/%: %
65cdf0c1d5Smjnelson	$(INS.pyfile)
66cdf0c1d5Smjnelson
67cdf0c1d5Smjnelson$(SUBDIRS): FRC
68cdf0c1d5Smjnelson	@cd $@; pwd; $(MAKE) $(TARGET)
69cdf0c1d5Smjnelson
70cdf0c1d5SmjnelsonFRC:
71cdf0c1d5Smjnelson
72cdf0c1d5Smjnelsoninclude ../Makefile.targ
73