[go: up one dir, main page]

File: Makefile

package info (click to toggle)
sork-accounts 2.1.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 532 kB
  • ctags: 79
  • sloc: sh: 553; php: 360; makefile: 114; perl: 30; xml: 16
file content (56 lines) | stat: -rw-r--r-- 1,740 bytes parent folder | download
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
# accounts .mo files makefile
#
# $Horde: accounts/po/Makefile,v 1.1.1.1 2002/05/22 03:10:15 ericr Exp $ 
#

APPLICATION = accounts
HORDE = ../..
MSGFMT = msgfmt --statistics -c -v -o
MSGFMTSOL = msgfmt -v -o
MSGCOMM = msgcomm --more-than=0 -s -o -

all: install

install: *.po
	@echo "Checking for os ... ${OSTYPE}"; \
	if test ${OSTYPE} = "solaris"; then \
	    echo "You'll probably get some warnings on Solaris. This is normal."; \
	fi; \
	for LOCALE in `ls *.po | sed 's/\..*//g'`; do \
		if test $${LOCALE}.po = "messages.po"; then \
			continue; \
		fi; \
		echo "Compiling locale $${LOCALE}:"; \
		if ./shtool mkdir -p ../locale/$${LOCALE}/LC_MESSAGES; then \
		    if test -r ${HORDE}/po/$${LOCALE}.po; then \
		        if test ${OSTYPE} = "solaris"; then \
        			if ${MSGFMTSOL} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po ${HORDE}/po/$${LOCALE}.po; then \
        				echo "  ... done"; \
        				echo; \
        			else \
        				echo "  ... FAILED"; \
        				echo; \
        			fi \
		        else \
        			if ${MSGCOMM} $${LOCALE}.po ${HORDE}/po/$${LOCALE}.po | ${MSGFMT} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo -; then \
        				echo "  ... done"; \
        				echo; \
        			else \
        				echo "  ... FAILED"; \
        				echo; \
        			fi \
    			fi; \
		    else \
		        echo "Warning: Horde po file for $${LOCALE} does not exist."; \
    			if ${MSGFMT} ../locale/$${LOCALE}/LC_MESSAGES/${APPLICATION}.mo $${LOCALE}.po; then \
    				echo "  ... done"; \
    				echo; \
    			else \
    				echo "  ... FAILED"; \
    				echo; \
    			fi \
		    fi \
		else \
			echo "Could not create locale directory for $${LOCALE}."; \
		fi \
	done;