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 2008 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_getconf.sh \ 106 tests/sun_solaris_local_compound_nameref001.sh \ 107 tests/sun_solaris_staticvariables.sh \ 108 tests/sun_solaris_vartree001.sh \ 109 tests/sun_solaris_vartree002.sh \ 110 tests/sun_solaris_vartree003.sh \ 111 tests/substring.sh \ 112 tests/subshell.sh \ 113 tests/tilde.sh \ 114 tests/timetype.sh \ 115 tests/types.sh \ 116 tests/variables.sh \ 117 tests/vartree1.sh \ 118 tests/vartree2.sh 119 120# Rules for executables 121$(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755 122$(ROOTDEMODIRBASE)/fun/% := FILEMODE= 755 123$(ROOTDEMODIRBASE)/bin/% := FILEMODE= 755 124 125# ToDO: We should replace the "cat $<" below with $ shcomp $< # once the 126# build machines start to ship /usr/bin/shcomp to compile the scripts 127# in bin/ and use $ shcomp -n $< /dev/null 2>&1 # to do minimum lint-style 128# checks before installation. 129$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh 130 cat "$<" >"$(@F)" 131 $(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)" 132 $(RM) "$(@F)" 133 134# Documentation rules 135$(ROOTDEMODIRBASE)/doc/%: common/% 136 $(INS.file) 137 138$(ROOTDEMODIRBASE)/doc/%: misc/% 139 $(INS.file) 140 141ROOTDEMODIRS= $(ROOTDEMODIRBASE) .WAIT \ 142 $(ROOTDEMODIRBASE)/bin \ 143 $(ROOTDEMODIRBASE)/doc \ 144 $(ROOTDEMODIRBASE)/fun \ 145 $(ROOTDEMODIRBASE)/tests 146 147install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) 148