OpenSolaris_b135/lib/libshell/Makefile.demo

#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#

#
# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

ROOTDEMODIRBASE=	$(ROOT)/usr/demo/ksh

DEMOFILES= \
	bin/cpvprint \
	bin/crawlsrccomments \
	bin/filemutexdemo1 \
	bin/filetree1 \
	bin/gnaw \
	bin/mandelbrotset1 \
	bin/multifollow \
	bin/numtree1 \
	bin/primenumbers1 \
	bin/rssread \
	bin/shcalc \
	bin/shircbot \
	bin/shlint \
	bin/shman \
	bin/shnote \
	bin/shpiano \
	bin/shtinyurl \
	bin/shtwitter \
	bin/simplefileattributetree1 \
	bin/simplefiletree1 \
	bin/svcproptree1 \
	bin/termclock \
	bin/test_net_sctp \
	bin/xmldocumenttree1 \
	fun/dirs \
	fun/popd \
	fun/pushd \
	fun/title \
	src/cpvprint.sh \
	src/crawlsrccomments.sh \
	src/filemutexdemo1.sh \
	src/filetree1.sh \
	src/gnaw.sh \
	src/mandelbrotset1.sh \
	src/multifollow.sh \
	src/numtree1.sh \
	src/primenumbers1.sh \
	src/rssread.sh \
	src/shcalc.sh \
	src/shircbot.sh \
	src/shlint.sh \
	src/shman.sh \
	src/shnote.sh \
	src/shpiano.sh \
	src/shtinyurl.sh \
	src/shtwitter.sh \
	src/simplefileattributetree1.sh \
	src/simplefiletree1.sh \
	src/svcproptree1.sh \
	src/termclock.sh \
	src/test_net_sctp.sh \
	src/xmldocumenttree1.sh \
	tests/README.tests \
	tests/shtests \
	tests/alias.sh \
	tests/append.sh \
	tests/arith.sh \
	tests/arrays.sh \
	tests/arrays2.sh \
	tests/attributes.sh \
	tests/basic.sh \
	tests/bracket.sh \
	tests/builtins.sh \
	tests/case.sh \
	tests/comvar.sh \
	tests/coprocess.sh \
	tests/cubetype.sh \
	tests/enum.sh \
	tests/exit.sh \
	tests/expand.sh \
	tests/functions.sh \
	tests/glob.sh \
	tests/grep.sh \
	tests/heredoc.sh \
	tests/io.sh \
	tests/nameref.sh \
	tests/options.sh \
	tests/path.sh \
	tests/pointtype.sh \
	tests/quoting.sh \
	tests/quoting2.sh \
	tests/recttype.sh \
	tests/restricted.sh \
	tests/return.sh \
	tests/select.sh \
	tests/sigchld.sh \
	tests/signal.sh \
	tests/statics.sh \
	tests/subshell.sh \
	tests/substring.sh \
	tests/sun_solaris_array_default_datatype.sh \
	tests/sun_solaris_builtin_poll.sh \
	tests/sun_solaris_builtin_sum.sh \
	tests/sun_solaris_builtin_tail.sh \
	tests/sun_solaris_command_substitution.sh \
	tests/sun_solaris_compound_nameref.sh \
	tests/sun_solaris_compoundvario.sh \
	tests/sun_solaris_cr_6687139_command_substitution_exec_redirection_allocation_loop.sh \
	tests/sun_solaris_cr_6713682_compound_var_bleeds_through_subshell.sh \
	tests/sun_solaris_cr_6722134_background_CHLD_trap.sh \
	tests/sun_solaris_cr_6753538_subshell_leaks_umask.sh \
	tests/sun_solaris_cr_6754020_weird_square_bracket_expansion.sh \
	tests/sun_solaris_cr_6763594_command_failure_execs_twice.sh \
	tests/sun_solaris_cr_6766246_pattern_matching_bug.sh \
	tests/sun_solaris_cr_6769332_substitutions_terminate_shell_after_257_iterations.sh \
	tests/sun_solaris_cr_6777491_lacks_arithmetric_function_iszero.sh \
	tests/sun_solaris_cr_6778077_sigthaw_trap.sh \
	tests/sun_solaris_cr_6789247_printf_hexfloat_rounding.sh \
	tests/sun_solaris_cr_6800929_large_command_substitution_hang.sh \
	tests/sun_solaris_cr_6805792_varmovetest1.sh \
	tests/sun_solaris_cr_6805794_character_to_wchar_not_working.sh \
	tests/sun_solaris_cr_6805795_negative_zero.sh \
	tests/sun_solaris_cr_6807179_shellpattern_uses_getpwnam.sh \
	tests/sun_solaris_cr_6835835_builtin_cat_n_broken.sh \
	tests/sun_solaris_cr_6848486_echo_test_with_test_undefined_executes_test_builtin.sh \
	tests/sun_solaris_cr_6855875_typeset_hexfloat_has_too_few_digits.sh \
	tests/sun_solaris_cr_6862121_shbinexec_kernel_module_defunct.sh \
	tests/sun_solaris_cr_6881017_background_process_in_subshell_hangs_caller.sh \
	tests/sun_solaris_getconf.sh \
	tests/sun_solaris_local_compound_nameref001.sh \
	tests/sun_solaris_staticvariables.sh \
	tests/sun_solaris_vartree001.sh \
	tests/sun_solaris_vartree002.sh \
	tests/sun_solaris_vartree003.sh \
	tests/tilde.sh \
	tests/timetype.sh \
	tests/treemove.sh \
	tests/types.sh \
	tests/variables.sh \
	tests/vartree1.sh \
	tests/vartree2.sh

# Rules for executables
$(ROOTDEMODIRBASE)/tests/shtests := FILEMODE= 755
$(ROOTDEMODIRBASE)/fun/%	 := FILEMODE= 755
$(ROOTDEMODIRBASE)/bin/%	 := FILEMODE= 755

# ToDO: We should replace the "cat $<" below with $ shcomp $< # once the
# build machines start to ship /usr/bin/shcomp to compile the scripts
# in bin/ and use $ shcomp -n $< /dev/null 2>&1 # to do minimum lint-style
# checks before installation.
$(ROOTDEMODIRBASE)/bin/%: common/scripts/%.sh
	cat "$<" >"$(@F)"
	$(INS) -s -m $(FILEMODE) -f $(@D) "$(@F)"
	$(RM) "$(@F)"

$(ROOTDEMODIRBASE)/src/%.sh: common/scripts/%.sh
	$(INS.file)
	
ROOTDEMODIRS=	$(ROOTDEMODIRBASE) .WAIT \
		$(ROOTDEMODIRBASE)/bin \
		$(ROOTDEMODIRBASE)/fun \
		$(ROOTDEMODIRBASE)/src \
		$(ROOTDEMODIRBASE)/tests

install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)