8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / sgs / packages / Makefile
blobc66828ad85f853e29d8dd3b3ccaf9279ee114868
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
23 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
26 include $(SRC)/Makefile.master
27 include $(SRC)/cmd/sgs/Makefile.var
29 BUILDLOG= package_build.$(MACH).log
31 MACHS:sh= if [ "$MACH" = "sparc" ]; \
32 then echo "sparc sparcv9"; \
33 elif [ "$MACH" = "i386" ]; \
34 then echo "i386 amd64"; \
35 else echo "unknown"; \
38 RDBDIRS= $(MACHS:%=../librtld_db/demo/%)
39 LDMAKEDIRS= $(MACHS:%=../libldmake/%)
41 SUBDIRS1= ../libconv \
42 .WAIT \
43 ../libdl \
44 .WAIT \
45 ../libelf \
46 .WAIT \
47 ../liblddbg \
48 ../librtld_db \
49 .WAIT \
50 ../librtld \
51 ../libcrle
53 SUBDIRS2 = ../rtld \
54 ../rtld.4.x \
55 ../libldstab \
56 ../lari \
57 ../ldprof \
58 ../lddstub \
59 $(LDMAKEDIRS) \
60 ../0@0 \
61 ../tools \
62 $(RDBDIRS)
65 # Package dirs are directories which specifically
66 # have a 'package' target. This target is used to key
67 # off of whether a system build is performed
68 # or a SUNWonld build.
70 PKGDIRS= ../libcrle \
71 ../libld \
72 ../elfdump \
73 ../elfedit \
74 ../elfedit/modules \
75 ../elfwrap \
76 ../ar \
77 ../crle \
78 ../dump \
79 ../lari \
80 ../ld \
81 ../ldd \
82 ../ldprof \
83 ../nm \
84 ../mcs \
85 ../moe \
86 ../pvs
88 $(SUBDIRS1) $(SUBDIRS2) := TARGET = install
89 $(PKGDIRS) := TARGET = package
91 ../%: FRC
92 @ cd $@; pwd; $(MAKE) $(TARGET)
94 .KEEP_STATE_FILE: .make.state.$(MACH)
95 .KEEP_STATE:
96 .PARALLEL: $(SUBDIRS1) $(PKGDIRS) $(SUBDIRS2)
98 all clean clobber install: FRC
99 @ cd $(MACH); pwd; $(MAKE) $@
102 # invoke `package' to build this package from scratch. It will
103 # perform make install in the directories that contains components
104 # that this package is dependent upon
106 package: FRC
107 @/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG)
108 @ echo "===BUILD COMPLETED checking for warnings...==="
109 @ grep -i "warning:" $(BUILDLOG) | grep -v PSTAMP | cat
110 @ echo "==================done========================="
112 package_build: package_dep .WAIT package_chkmsg .WAIT install
114 package_chkmsg: FRC
115 @ cd ..; pwd; $(MAKE) chkmsg
117 package_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \
118 $(PKGDIRS) .WAIT $(SUBDIRS2)
120 package_dep_: FRC
121 @ cd ../tools; pwd; $(MAKE) proto && ./proto $(RELEASE)
122 @ cd $(SRC)/common/mapfiles/gen ; pwd; $(MAKE) install
123 @ cd $(SRC)/head; pwd; $(MAKE) \
124 $(ROOT)/usr/include/dlfcn.h \
125 $(ROOT)/usr/include/gelf.h \
126 $(ROOT)/usr/include/libelf.h \
127 $(ROOT)/usr/include/proc_service.h \
128 $(ROOT)/usr/include/rtld_db.h \
129 $(ROOT)/usr/include/link.h
130 @ cd $(SRC)/lib/libproc; pwd; $(MAKE) install_h
131 @ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \
132 $(ROOT)/usr/include/sys/elf.h \
133 $(ROOT)/usr/include/sys/elf_386.h \
134 $(ROOT)/usr/include/sys/elf_SPARC.h \
135 $(ROOT)/usr/include/sys/elf_notes.h \
136 $(ROOT)/usr/include/sys/elf_amd64.h \
137 $(ROOT)/usr/include/sys/elftypes.h \
138 $(ROOT)/usr/include/sys/auxv.h \
139 $(ROOT)/usr/include/sys/auxv_SPARC.h \
140 $(ROOT)/usr/include/sys/auxv_386.h \
141 $(ROOT)/usr/include/sys/avl.h \
142 $(ROOT)/usr/include/sys/link.h \
143 $(ROOT)/usr/include/sys/machelf.h \
144 $(ROOT)/usr/include/sys/note.h \
145 $(ROOT)/usr/include/sys/systeminfo.h
146 @ cd ../tools/$(MACH); pwd; $(MAKE) sgsmsg piglatin
147 @ cd ..; pwd; $(MAKE) _msg_sgsmsg
148 @ cd ..; pwd; $(MAKE) native-add
149 @ cd ../libconv; pwd; $(MAKE) all
150 @ cd ../link_audit; pwd; $(MAKE) package
151 @ cd ../messages/$(MACH); pwd; $(MAKE) test
153 lint: FRC
154 $(MAKE) -f Makefile.lint lint
156 FRC: