xref: /titanic_41/usr/src/lib/libshell/Makefile.demo (revision 5203bc321053fb87d7073c7640548fab73634793)
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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24#
25
26ROOTDEMODIRBASE=	$(ROOT)/usr/demo/ksh
27
28DEMOFILES= \
29	bin/cpvprint \
30	bin/crawlsrccomments \
31	bin/filemutexdemo1 \
32	bin/filetree1 \
33	bin/gnaw \
34	bin/mandelbrotset1 \
35	bin/multifollow \
36	bin/numtree1 \
37	bin/primenumbers1 \
38	bin/rssread \
39	bin/shcalc \
40	bin/shircbot \
41	bin/shlint \
42	bin/shman \
43	bin/shnote \
44	bin/shpiano \
45	bin/shtinyurl \
46	bin/shtwitter \
47	bin/simplefileattributetree1 \
48	bin/simplefiletree1 \
49	bin/svcproptree1 \
50	bin/termclock \
51	bin/test_net_sctp \
52	bin/xmldocumenttree1 \
53	fun/dirs \
54	fun/popd \
55	fun/pushd \
56	fun/title \
57	src/cpvprint.sh \
58	src/crawlsrccomments.sh \
59	src/filemutexdemo1.sh \
60	src/filetree1.sh \
61	src/gnaw.sh \
62	src/mandelbrotset1.sh \
63	src/multifollow.sh \
64	src/numtree1.sh \
65	src/primenumbers1.sh \
66	src/rssread.sh \
67	src/shcalc.sh \
68	src/shircbot.sh \
69	src/shlint.sh \
70	src/shman.sh \
71	src/shnote.sh \
72	src/shpiano.sh \
73	src/shtinyurl.sh \
74	src/shtwitter.sh \
75	src/simplefileattributetree1.sh \
76	src/simplefiletree1.sh \
77	src/svcproptree1.sh \
78	src/termclock.sh \
79	src/test_net_sctp.sh \
80	src/xmldocumenttree1.sh \
81	tests/README.tests \
82	tests/shtests \
83	tests/alias.sh \
84	tests/append.sh \
85	tests/arith.sh \
86	tests/arrays.sh \
87	tests/arrays2.sh \
88	tests/attributes.sh \
89	tests/basic.sh \
90	tests/bracket.sh \
91	tests/builtins.sh \
92	tests/case.sh \
93	tests/comvar.sh \
94	tests/coprocess.sh \
95	tests/cubetype.sh \
96	tests/enum.sh \
97	tests/exit.sh \
98	tests/expand.sh \
99	tests/functions.sh \
100	tests/glob.sh \
101	tests/grep.sh \
102	tests/heredoc.sh \
103	tests/io.sh \
104	tests/nameref.sh \
105	tests/options.sh \
106	tests/path.sh \
107	tests/pointtype.sh \
108	tests/quoting.sh \
109	tests/quoting2.sh \
110	tests/recttype.sh \
111	tests/restricted.sh \
112	tests/return.sh \
113	tests/select.sh \
114	tests/sigchld.sh \
115	tests/signal.sh \
116	tests/statics.sh \
117	tests/subshell.sh \
118	tests/substring.sh \
119	tests/sun_solaris_array_default_datatype.sh \
120	tests/sun_solaris_builtin_poll.sh \
121	tests/sun_solaris_builtin_sum.sh \
122	tests/sun_solaris_builtin_tail.sh \
123	tests/sun_solaris_command_substitution.sh \
124	tests/sun_solaris_compound_misc.sh \
125	tests/sun_solaris_compound_nameref.sh \
126	tests/sun_solaris_compoundvario.sh \
127	tests/sun_solaris_cr_xxxxxxxx_template.sh \
128	tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \
129	tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \
130	tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \
131	tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh \
132	tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh \
133	tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh \
134	tests/sun_solaris_cr_6766246_pattern_matching_bug.sh \
135	tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh \
136	tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh \
137	tests/sun_solaris_cr_6778077_sigthaw_trap.sh \
138	tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh \
139	tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh \
140	tests/sun_solaris_cr_6805792_varmovetest1.sh \
141	tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh \
142	tests/sun_solaris_cr_6805795_negative_zero.sh \
143	tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh \
144	tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh \
145	tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh \
146	tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh \
147	tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh \
148	tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh \
149	tests/sun_solaris_cr_6887363_shell_sometimes_mishandles_return_value_of_its_child_process.sh \
150	tests/sun_solaris_cr_6904557_wc_no_longer_counts_number_of_bytes_correctly.sh \
151	tests/sun_solaris_cr_6904575_cut_-d_with_multibyte_character_no_longer_works.sh \
152	tests/sun_solaris_cr_6904878_join_-t_no_longer_works_with_multibyte_char_separator.sh \
153	tests/sun_solaris_cr_6907460_EXIT_trap_handlers_are_sometimes_executed_twice.sh \
154	tests/sun_solaris_getconf.sh \
155	tests/sun_solaris_locale_misc.sh \
156	tests/sun_solaris_local_compound_nameref001.sh \
157	tests/sun_solaris_staticvariables.sh \
158	tests/sun_solaris_vartree001.sh \
159	tests/sun_solaris_vartree002.sh \
160	tests/sun_solaris_vartree003.sh \
161	tests/tilde.sh \
162	tests/timetype.sh \
163	tests/treemove.sh \
164	tests/types.sh \
165	tests/variables.sh \
166	tests/vartree1.sh \
167	tests/vartree2.sh
168
169# Rules for executables
170$(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
171$(ROOTDEMODIRBASE)/fun/%	 := FILEMODE= 755
172$(ROOTDEMODIRBASE)/bin/%	 := FILEMODE= 755
173
174$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
175	/usr/bin/shcomp "$<" >"$(@F)"
176	$(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)"
177	$(RM) "$(@F)"
178
179$(ROOTDEMODIRBASE)/src/%.sh: common/scripts/%.sh
180	$(INS.file)
181
182ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
183		$(ROOTDEMODIRBASE)/bin \
184		$(ROOTDEMODIRBASE)/fun \
185		$(ROOTDEMODIRBASE)/src \
186		$(ROOTDEMODIRBASE)/tests
187
188install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
189