Commit 92b6ebdb82ca3737d0e82a2cd60b9a8282829f06
1 parent
7ce3c79a
Exists in
master
and in
1 other branch
Melhorando geração dos arquivos de tradução.
Showing
1 changed file
with
31 additions
and
1 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -42,6 +42,7 @@ sbindir=@sbindir@ |
| 42 | 42 | libdir=@libdir@ |
| 43 | 43 | |
| 44 | 44 | BASEDIR=@BASEDIR@ |
| 45 | +POTDIR=$(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME) | |
| 45 | 46 | |
| 46 | 47 | OBJDIR=.obj |
| 47 | 48 | OBJDBG=$(OBJDIR)/Debug |
| ... | ... | @@ -52,6 +53,8 @@ CC=@CC@ |
| 52 | 53 | LD=@CC@ |
| 53 | 54 | AR=@AR@ |
| 54 | 55 | GENMARSHAL=@GENMARSHAL@ |
| 56 | +XGETTEXT=@XGETTEXT@ | |
| 57 | +MSGCAT=@MSGCAT@ | |
| 55 | 58 | |
| 56 | 59 | CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ -Wno-deprecated-declarations @GTK_CFLAGS@ -I$(BASEDIR)/src/include/pw3270 |
| 57 | 60 | LIBS=@LIBS@ @GTK_LIBS@ @LIB3270_LIBS@ |
| ... | ... | @@ -82,6 +85,21 @@ $(OBJRLS)/%.o: \ |
| 82 | 85 | -DBUILD_DATE=`date +"0x%Y%m%d"` \ |
| 83 | 86 | -o $@ -c $< |
| 84 | 87 | |
| 88 | +$(POTDIR)/%.pot: %.c | |
| 89 | + | |
| 90 | + @echo $< ... | |
| 91 | + @$(MKDIR) `dirname $@` | |
| 92 | + @$(XGETTEXT) \ | |
| 93 | + --default-domain=$(PACKAGE) \ | |
| 94 | + --language=C \ | |
| 95 | + --keyword=_ \ | |
| 96 | + --keyword=N_ \ | |
| 97 | + --keyword=MSG_:2 \ | |
| 98 | + --output=$@ \ | |
| 99 | + $< | |
| 100 | + | |
| 101 | + @touch $@ | |
| 102 | + | |
| 85 | 103 | marshal.h: \ |
| 86 | 104 | genmarshal |
| 87 | 105 | |
| ... | ... | @@ -108,6 +126,16 @@ $(BASEDIR)/.obj/Release/$(MODULE_NAME).a: \ |
| 108 | 126 | @$(MKDIR) `dirname $@` |
| 109 | 127 | @$(AR) rcs $@ $^ |
| 110 | 128 | |
| 129 | +pot: \ | |
| 130 | + $(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME).pot | |
| 131 | + | |
| 132 | +$(BASEDIR)/.pot/$(PACKAGE_TARNAME)/$(MODULE_NAME).pot: \ | |
| 133 | + $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(SRC).pot) | |
| 134 | + | |
| 135 | + @rm -f $@ | |
| 136 | + @mkdir -p `dirname $@` | |
| 137 | + @$(MSGCAT) --sort-output $^ > $@ | |
| 138 | + | |
| 111 | 139 | #---[ Debug Targets ]-------------------------------------------------------------------- |
| 112 | 140 | |
| 113 | 141 | Debug: \ |
| ... | ... | @@ -132,8 +160,10 @@ cleanRelease: |
| 132 | 160 | @rm -fr $(BASEDIR)/.obj/Release/$(MODULE_NAME).a \ |
| 133 | 161 | $(OBJRLS) |
| 134 | 162 | |
| 163 | + @rm -fr $(POTDIR) | |
| 164 | + | |
| 135 | 165 | clean: \ |
| 136 | 166 | cleanDebug \ |
| 137 | 167 | cleanRelease |
| 138 | 168 | |
| 139 | - | |
| 169 | + | ... | ... |