File: Makefile

package info (click to toggle)
ceccomp 3.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,528 kB
  • sloc: ansic: 3,154; python: 653; makefile: 240; sh: 226
file content (27 lines) | stat: -rw-r--r-- 707 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
GREEN := $(shell printf '\033[32m')
RESET := $(shell printf '\033[0m')
ECHO_NOPROG = printf "    $(1)\t$(2)\n"

INC_DIR := ../include
SRC_DIR := ../src
INC_SRCS := $(shell find $(INC_DIR) -name '*.h')
C_SRCS := $(shell find $(SRC_DIR) -name '*.c' -or -name '*.s')

SOURCES_LIST := SOURCES.txt
POT_FILE := ceccomp.pot
PO_ZHCN := zh_CN.po

all: $(PO_ZHCN)
	$Q$(call ECHO_NOPROG,$(GREEN)UPDATED,po$(RESET))

$(SOURCES_LIST): $(INC_SRCS) $(C_SRCS)
	$Q$(call ECHO_NOPROG,TR,$@)
	$Qecho $^ | tr ' ' '\n' > $@

$(POT_FILE): $(SOURCES_LIST)
	$Q$(call ECHO_NOPROG,XGETTEXT,$@)
	$Qxgettext -k_ -o $@ -f $<

$(PO_ZHCN): $(POT_FILE)
	$Q$(call ECHO_NOPROG,MSGMERGE,$@)
	$Qmsgmerge --previous --update $@ $< 2> /dev/null