Home | History | Annotate | Download | only in libshell
      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 
     27 ROOTDEMODIRBASE=	$(ROOT)/usr/demo/ksh
     28 
     29 DEMOFILES= \
     30 	bin/cpvprint \
     31 	bin/crawlsrccomments \
     32 	bin/filemutexdemo1 \
     33 	bin/filetree1 \
     34 	bin/gnaw \
     35 	bin/mandelbrotset1 \
     36 	bin/multifollow \
     37 	bin/numtree1 \
     38 	bin/primenumbers1 \
     39 	bin/rssread \
     40 	bin/shcalc \
     41 	bin/shircbot \
     42 	bin/shlint \
     43 	bin/shman \
     44 	bin/shnote \
     45 	bin/shpiano \
     46 	bin/shtinyurl \
     47 	bin/shtwitter \
     48 	bin/simplefileattributetree1 \
     49 	bin/simplefiletree1 \
     50 	bin/svcproptree1 \
     51 	bin/termclock \
     52 	bin/test_net_sctp \
     53 	bin/xmldocumenttree1 \
     54 	fun/dirs \
     55 	fun/popd \
     56 	fun/pushd \
     57 	fun/title \
     58 	src/cpvprint.sh \
     59 	src/crawlsrccomments.sh \
     60 	src/filemutexdemo1.sh \
     61 	src/filetree1.sh \
     62 	src/gnaw.sh \
     63 	src/mandelbrotset1.sh \
     64 	src/multifollow.sh \
     65 	src/numtree1.sh \
     66 	src/primenumbers1.sh \
     67 	src/rssread.sh \
     68 	src/shcalc.sh \
     69 	src/shircbot.sh \
     70 	src/shlint.sh \
     71 	src/shman.sh \
     72 	src/shnote.sh \
     73 	src/shpiano.sh \
     74 	src/shtinyurl.sh \
     75 	src/shtwitter.sh \
     76 	src/simplefileattributetree1.sh \
     77 	src/simplefiletree1.sh \
     78 	src/svcproptree1.sh \
     79 	src/termclock.sh \
     80 	src/test_net_sctp.sh \
     81 	src/xmldocumenttree1.sh \
     82 	tests/README.tests \
     83 	tests/shtests \
     84 	tests/alias.sh \
     85 	tests/append.sh \
     86 	tests/arith.sh \
     87 	tests/arrays.sh \
     88 	tests/arrays2.sh \
     89 	tests/attributes.sh \
     90 	tests/basic.sh \
     91 	tests/bracket.sh \
     92 	tests/builtins.sh \
     93 	tests/case.sh \
     94 	tests/comvar.sh \
     95 	tests/coprocess.sh \
     96 	tests/cubetype.sh \
     97 	tests/enum.sh \
     98 	tests/exit.sh \
     99 	tests/expand.sh \
    100 	tests/functions.sh \
    101 	tests/glob.sh \
    102 	tests/grep.sh \
    103 	tests/heredoc.sh \
    104 	tests/io.sh \
    105 	tests/nameref.sh \
    106 	tests/options.sh \
    107 	tests/path.sh \
    108 	tests/pointtype.sh \
    109 	tests/quoting.sh \
    110 	tests/quoting2.sh \
    111 	tests/recttype.sh \
    112 	tests/restricted.sh \
    113 	tests/return.sh \
    114 	tests/select.sh \
    115 	tests/sigchld.sh \
    116 	tests/signal.sh \
    117 	tests/statics.sh \
    118 	tests/subshell.sh \
    119 	tests/substring.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_nameref.sh \
    126 	tests/sun_solaris_compoundvario.sh \
    127 	tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \
    128 	tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \
    129 	tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \
    130 	tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh \
    131 	tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh \
    132 	tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh \
    133 	tests/sun_solaris_cr_6766246_pattern_matching_bug.sh \
    134 	tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh \
    135 	tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh \
    136 	tests/sun_solaris_cr_6778077_sigthaw_trap.sh \
    137 	tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh \
    138 	tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh \
    139 	tests/sun_solaris_cr_6805792_varmovetest1.sh \
    140 	tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh \
    141 	tests/sun_solaris_cr_6805795_negative_zero.sh \
    142 	tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh \
    143 	tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh \
    144 	tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh \
    145 	tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh \
    146 	tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh \
    147 	tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh \
    148 	tests/sun_solaris_getconf.sh \
    149 	tests/sun_solaris_local_compound_nameref001.sh \
    150 	tests/sun_solaris_staticvariables.sh \
    151 	tests/sun_solaris_vartree001.sh \
    152 	tests/sun_solaris_vartree002.sh \
    153 	tests/sun_solaris_vartree003.sh \
    154 	tests/tilde.sh \
    155 	tests/timetype.sh \
    156 	tests/treemove.sh \
    157 	tests/types.sh \
    158 	tests/variables.sh \
    159 	tests/vartree1.sh \
    160 	tests/vartree2.sh
    161 
    162 # Rules for executables
    163 $(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
    164 $(ROOTDEMODIRBASE)/fun/%	 := FILEMODE= 755
    165 $(ROOTDEMODIRBASE)/bin/%	 := FILEMODE= 755
    166 
    167 # ToDO: We should replace the "cat $<" below with $ shcomp $< # once the
    168 # build machines start to ship /usr/bin/shcomp to compile the scripts
    169 # in bin/ and use $ shcomp -n $< /dev/null 2>&1 # to do minimum lint-style
    170 # checks before installation.
    171 $(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
    172 	cat "$<" >"$(@F)"
    173 	$(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)"
    174 	$(RM) "$(@F)"
    175 
    176 $(ROOTDEMODIRBASE)/src/%.sh: common/scripts/%.sh
    177 	$(INS.file)
    178 	
    179 ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
    180 		$(ROOTDEMODIRBASE)/bin \
    181 		$(ROOTDEMODIRBASE)/fun \
    182 		$(ROOTDEMODIRBASE)/src \
    183 		$(ROOTDEMODIRBASE)/tests
    184 
    185 install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
    186