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