1#!/bin/sh
2###########################################################################
3#ident "@(#)MKLINKS	1.5 15/03/25 "
4###########################################################################
5# Written 2008-2015 by J. Schilling
6###########################################################################
7# Copyright (c) 2008-2015 J. Schilling
8###########################################################################
9# The contents of this file are subject to the terms of the
10# Common Development and Distribution License, Version 1.0 only
11# (the "License").  You may not use this file except in compliance
12# with the License.
13#
14# See the file CDDL.Schily.txt in this distribution for details.
15# A copy of the CDDL is also available via the Internet at
16# http://www.opensource.org/licenses/cddl1.txt
17#
18# When distributing Covered Code, include this CDDL HEADER in each
19# file and include the License file CDDL.Schily.txt from this distribution.
20###########################################################################
21if [ -r ldummy.lnk ]; then
22	if [ $# -le 0 ]; then
23		exit 0
24	fi
25fi
26###########################################################################
27symlink="ln -s"
28MKLINKS_TEST=${MKLINKS_TEST-:}
29if [ ".$MKLINKS_COPY" = '.' ]; then
30	rm -f xxzzy.123 xxzzy.345
31	echo test > xxzzy.123
32	$symlink xxzzy.123 xxzzy.345
33	test $? = 0 || symlink=cp
34	test -r xxzzy.345 || symlink=cp
35	${MKLINKS_TEST} -h xxzzy.345 || symlink=cp
36	rm -f xxzzy.123 xxzzy.345
37else
38	symlink=cp
39fi
40###########################################################################
41
42$symlink Makefile.cmd	ldummy.lnk
43$symlink Makefile.cmd	cmd.mk
44$symlink Makefile.inc	inc.mk
45$symlink Makefile.lib	lib.mk
46$symlink Makefile.shl	shl.mk
47
48$symlink temp-clang.rul	temp-clang32.rul
49$symlink temp-clang.rul	temp-clang64.rul
50
51$symlink temp-gcc.rul	temp-gcc32.rul
52$symlink temp-gcc.rul	temp-gcc64.rul
53