xref: /titanic_50/usr/src/lib/libshell/Makefile.demo (revision de81e71e031139a0a7f13b7bf64152c3faa76698)
1#
2# CDDL HEADER START
3#
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.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27ROOTDEMODIRBASE=	$(ROOT)/usr/demo/ksh
28
29DEMOFILES= \
30	doc/RELEASE \
31	doc/README \
32	doc/TYPES \
33	doc/DESIGN \
34	doc/COMPATIBILITY \
35	doc/OBSOLETE \
36	bin/crawlsrccomments \
37	bin/filemutexdemo1 \
38	bin/filetree1 \
39	bin/gnaw \
40	bin/mandelbrotset1 \
41	bin/multifollow \
42	bin/primenumbers1 \
43	bin/rssread \
44	bin/shcalc \
45	bin/shircbot \
46	bin/shlint \
47	bin/shman \
48	bin/shnote \
49	bin/shpiano \
50	bin/shtinyurl \
51	bin/shtwitter \
52	bin/svcproptree1 \
53	bin/termclock \
54	bin/test_net_sctp \
55	bin/xmldocumenttree1 \
56	fun/dirs \
57	fun/popd \
58	fun/pushd \
59	fun/title \
60	tests/shtests \
61	tests/alias.sh \
62	tests/append.sh \
63	tests/arith.sh \
64	tests/arrays.sh \
65	tests/arrays2.sh \
66	tests/attributes.sh \
67	tests/basic.sh \
68	tests/bracket.sh \
69	tests/builtins.sh \
70	tests/case.sh \
71	tests/comvar.sh \
72	tests/coprocess.sh \
73	tests/cubetype.sh \
74	tests/enum.sh \
75	tests/exit.sh \
76	tests/expand.sh \
77	tests/functions.sh \
78	tests/glob.sh \
79	tests/grep.sh \
80	tests/heredoc.sh \
81	tests/io.sh \
82	tests/locale.sh \
83	tests/nameref.sh \
84	tests/options.sh \
85	tests/path.sh \
86	tests/pointtype.sh \
87	tests/quoting.sh \
88	tests/quoting2.sh \
89	tests/recttype.sh \
90	tests/restricted.sh \
91	tests/return.sh \
92	tests/select.sh \
93	tests/sigchld.sh \
94	tests/signal.sh \
95	tests/statics.sh \
96	tests/sun_solaris_builtin_sum.sh \
97	tests/sun_solaris_compoundvario.sh \
98	tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \
99	tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \
100	tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \
101	tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh \
102	tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh \
103	tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh \
104	tests/sun_solaris_cr_6766246_pattern_matching_bug.sh \
105	tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh \
106	tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh \
107	tests/sun_solaris_getconf.sh \
108	tests/sun_solaris_local_compound_nameref001.sh \
109	tests/sun_solaris_staticvariables.sh \
110	tests/sun_solaris_vartree001.sh \
111	tests/sun_solaris_vartree002.sh \
112	tests/sun_solaris_vartree003.sh \
113	tests/substring.sh \
114	tests/subshell.sh \
115	tests/tilde.sh \
116	tests/timetype.sh \
117	tests/types.sh \
118	tests/variables.sh \
119	tests/vartree1.sh \
120	tests/vartree2.sh
121
122# Rules for executables
123$(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
124$(ROOTDEMODIRBASE)/fun/%	 := FILEMODE= 755
125$(ROOTDEMODIRBASE)/bin/%	 := FILEMODE= 755
126
127# ToDO: We should replace the "cat $<" below with $ shcomp $< # once the
128# build machines start to ship /usr/bin/shcomp to compile the scripts
129# in bin/ and use $ shcomp -n $< /dev/null 2>&1 # to do minimum lint-style
130# checks before installation.
131$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
132	cat "$<" >"$(@F)"
133	$(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)"
134	$(RM) "$(@F)"
135
136# Documentation rules
137$(ROOTDEMODIRBASE)/doc/%: common/%
138	$(INS.file)
139
140$(ROOTDEMODIRBASE)/doc/%: misc/%
141	$(INS.file)
142
143ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
144		$(ROOTDEMODIRBASE)/bin \
145		$(ROOTDEMODIRBASE)/doc \
146		$(ROOTDEMODIRBASE)/fun \
147		$(ROOTDEMODIRBASE)/tests
148
149install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
150