File: mkutf8dir.csh

package info (click to toggle)
fis-gtm 6.2-000-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,784 kB
  • ctags: 42,554
  • sloc: ansic: 358,483; asm: 4,847; csh: 4,574; sh: 2,261; awk: 200; makefile: 86; sed: 13
file content (75 lines) | stat: -rw-r--r-- 2,082 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! tcsh -f
#################################################################
#								#
#	Copyright 2007, 2011 Fidelity Information Services, Inc	#
#								#
#	This source code contains the intellectual property	#
#	of its copyright holder(s), and is made available	#
#	under a license.  If you do not know the terms of	#
#	the license, please stop and do not read further.	#
#								#
#################################################################

#
#######################################################################
#
#	mkutf8dir.csh - Used by makefile build procedure
#		Should be kept in sync with similar code in comlist.csh
#			If ICU is installed, create utf8 subdirectory.
#                   Mirror parent directory except for .o's.
#	                Build .o's in UTF-8 mode.
#
#######################################################################

set checkunicode = "../sr_unix/check_unicode_support.csh"
if ( -e $checkunicode ) then
    set incdir = ""
    if ( "Linux" == `uname` && "64" == "$gt_build_type" ) then
	switch (`uname -m`)
	case "x86_64":
	    set incdir = "../sr_x86_64"
	    breaksw
	case "s390x":
	    set incdir = "../sr_s390"
	    breaksw
	default:
	    breaksw
	endsw
    endif
    source $checkunicode $incdir
    if ("TRUE" == "$is_unicode_support") then
	if (! -e utf8) mkdir utf8
	if ( "OS/390" == $HOSTOS ) then
		setenv gtm_chset_locale $utflocale	# LC_CTYPE not picked up right
	endif
	setenv LC_CTYPE $utflocale
	unsetenv LC_ALL
	setenv gtm_chset UTF-8	# switch to "UTF-8" mode

	foreach file (*)
		# Skip utf8 directory
		if (-d $file && "utf8" == $file) then
			continue
		endif
		# Skip soft linking .o files
		set extension = $file:e
		if ($extension == "o") then
			continue
		endif
		# Soft link everything else
		if (-e utf8/$file) then
			rm -rf utf8/$file
		endif
		ln -s ../$file utf8/$file
	end

	cd utf8
	../mumps *.m
	if ($status != 0) then
		echo "mkutf8dir-E-compile_UTF8, Failed to compile .m programs in UTF-8 mode"
	endif
	cd ..
	setenv LC_CTYPE C
	unsetenv gtm_chset	# switch back to "M" mode
    endif
endif