Commit 7cfcac7ebd913c31006fe74f28607c80aa0c48e8

Authored by Perry Werneck
1 parent fb05ad6a

Reimplementando criação dos arquivos de linguagem.

Showing 1 changed file with 28 additions and 2 deletions   Show diff stats
Makefile.in
... ... @@ -48,6 +48,8 @@ libdir=@libdir@
48 48  
49 49 BASEDIR=@BASEDIR@
50 50  
  51 +POTDIR=$(BASEDIR)/.pot/lib3270
  52 +
51 53 OBJDIR=$(BASEDIR)/.obj/lib3270
52 54 OBJDBG=$(OBJDIR)/Debug
53 55 OBJRLS=$(OBJDIR)/Release
... ... @@ -65,6 +67,8 @@ LN_S=@LN_S@
65 67 AMTAR=@AMTAR@
66 68 SHELL=@SHELL@
67 69 MKDIR=@MKDIR_P@
  70 +XGETTEXT=@XGETTEXT@
  71 +MSGCAT=@MSGCAT@
68 72  
69 73 CC=@CC@
70 74 LD=@CC@
... ... @@ -100,6 +104,21 @@ $(OBJRLS)/%.o: \
100 104 -o $@ -c $<
101 105  
102 106  
  107 +$(POTDIR)/%.pot: %.c
  108 +
  109 + @echo $< ...
  110 + @$(MKDIR) `dirname $@`
  111 + @$(XGETTEXT) \
  112 + --default-domain=$(PACKAGE) \
  113 + --language=C \
  114 + --keyword=_ \
  115 + --keyword=N_ \
  116 + --keyword=MSG_:2 \
  117 + --output=$@ \
  118 + $<
  119 +
  120 + @touch $@
  121 +
103 122 #---[ Release Targets ]------------------------------------------------------------------
104 123  
105 124 all: \
... ... @@ -108,6 +127,13 @@ all: \
108 127 Release: \
109 128 $(BINRLS)/$(LIBNAME)
110 129  
  130 +$(BASEDIR)/.pot/lib3270.pot: \
  131 + $(foreach SRC, $(basename $(SOURCES)), $(POTDIR)/$(SRC).pot)
  132 +
  133 + @rm -f $@
  134 + @mkdir -p `dirname $@`
  135 + @$(MSGCAT) --sort-output $^ > $@
  136 +
111 137 $(BINRLS)/$(LIBNAME): \
112 138 $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@
113 139  
... ... @@ -186,7 +212,8 @@ cleanRelease:
186 212 @rm -fr $(OBJRLS) \
187 213 $(BINRLS)/$(LIBNAME) \
188 214 $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@ \
189   - $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@
  215 + $(BINRLS)/$(LIBNAME).@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ \
  216 + $(POTDIR)
190 217  
191 218 clean: \
192 219 cleanDebug \
... ... @@ -194,4 +221,3 @@ clean: \
194 221  
195 222  
196 223  
197   -
... ...