File: Makefile.in

package info (click to toggle)
brltty 6.9-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 44,828 kB
  • sloc: ansic: 154,246; java: 13,514; sh: 9,934; xml: 5,672; tcl: 2,679; makefile: 2,346; awk: 713; lisp: 366; python: 321; ml: 301
file content (76 lines) | stat: -rw-r--r-- 2,805 bytes parent folder | download | duplicates (4)
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
76
###############################################################################
# BRLTTY - A background process providing access to the console screen (when in
#          text mode) for a blind person using a refreshable braille display.
#
# Copyright (C) 1995-2025 by The BRLTTY Developers.
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
# GNU Lesser General Public License, as published by the Free Software
# Foundation; either version 2.1 of the License, or (at your option) any
# later version. Please see the file LICENSE-LGPL for details.
#
# Web Page: http://brltty.app/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

all:: objects languages

COPYRIGHT_HOLDER = The BRLTTY Developers
LANGUAGE_CODES = ar de fr it ka ru zh

LOCALE_SUBDIRECTORY = locale
MESSAGES_SUBDIRECTORY = LC_MESSAGES

TEMPLATE_EXTENSION = pot
SOURCE_EXTENSION = po
OBJECT_EXTENSION = mo

LANGUAGES_FILE = LINGUAS
TEMPLATE_FILE = $(SRC_DIR)/$(PACKAGE_TARNAME).$(TEMPLATE_EXTENSION)
OBJECT_FILE = $(PACKAGE_TARNAME).$(OBJECT_EXTENSION)

SOURCE_FILES = $(LANGUAGE_CODES:=.$(SOURCE_EXTENSION))
OBJECT_FILES = $(LANGUAGE_CODES:=.$(OBJECT_EXTENSION))

languages: $(LANGUAGES_FILE)
$(LANGUAGES_FILE): FORCE
	: >$@; \
	for language in $(LANGUAGE_CODES); do \
	echo $$language >>$@; \
	done

template $(TEMPLATE_EXTENSION): $(TEMPLATE_FILE)
#$(TEMPLATE_FILE): $(BLD_TOP)$(PGM_DIR)/cmds.auto.h FORCE
#	$(SRC_TOP)mkpot -p "$(PACKAGE_TARNAME)" -n "$(PACKAGE_VERSION)" -b "$(PACKAGE_BUGREPORT)" -c "$(COPYRIGHT_HOLDER)" -o $@ -- $(SRC_TOP) $(BLD_TOP)

sources: $(SOURCE_FILES)
%.$(SOURCE_EXTENSION): FORCE
	$(MSGMERGE) --quiet --update --force-po --no-wrap --no-fuzzy-matching -- $(SRC_DIR)/$@ $(TEMPLATE_FILE)
	set -- `date --utc +"%Y %m %d %H %M %z"` && \
	sed -e "/^.PO-Revision-Date:/s/....-..-.. ..:..[+-]..../$$1-$$2-$$3 $$4:$$5$$6/" -i $(SRC_DIR)/$@

objects: $(OBJECT_FILES)
%.$(OBJECT_EXTENSION): FORCE
	$(MSGFMT) --output-file $@ -- $(SRC_DIR)/$(@F:.$(OBJECT_EXTENSION)=.$(SOURCE_EXTENSION))
	directory="$(LOCALE_SUBDIRECTORY)/$(@:.$(OBJECT_EXTENSION)=)/$(MESSAGES_SUBDIRECTORY)"; \
	$(INSTALL_DIRECTORY) $${directory}; \
	cd $${directory}; \
	test -f $(OBJECT_FILE) || $(SYMLINK) ../../../$@ $(OBJECT_FILE);

clean::
	-rm -f -- *.$(OBJECT_EXTENSION) *~
	-rm -f -r -- $(LOCALE_SUBDIRECTORY)

install:: objects install-locale-directory
	for language in $(LANGUAGE_CODES); do \
	directory="$(INSTALL_LOCALE_DIRECTORY)/$${language}/$(MESSAGES_SUBDIRECTORY)" && \
        $(INSTALL_DIRECTORY) "$${directory}" && \
	$(INSTALL_DATA) "$${language}.$(OBJECT_EXTENSION)" "$${directory}/$(OBJECT_FILE)"; \
	done

uninstall::
	-rm -f -- $(INSTALL_LOCALE_DIRECTORY)/*/*/$(OBJECT_FILE)