Commit 1412dcf976a5dc08b85144368a3d5586029c436a
1 parent
e537971e
Exists in
master
and in
5 other branches
Reimplementando criação dos arquivos de linguagem.
Showing
3 changed files
with
68 additions
and
3 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -46,6 +46,7 @@ sysconfdir=@sysconfdir@ |
| 46 | 46 | mandir=@mandir@ |
| 47 | 47 | |
| 48 | 48 | BASEDIR=@BASEDIR@ |
| 49 | +POTDIR=$(BASEDIR)/.pot | |
| 49 | 50 | |
| 50 | 51 | BINDIR=$(BASEDIR)/.bin |
| 51 | 52 | BINDBG=$(BINDIR)/Debug |
| ... | ... | @@ -80,6 +81,13 @@ $(BINRLS)/%@DLLEXT@: \ |
| 80 | 81 | |
| 81 | 82 | @$(MAKE) -C src/$(basename $(notdir $@)) $@ |
| 82 | 83 | |
| 84 | +$(POTDIR)/%.pot: \ | |
| 85 | + $(DEPENDS) \ | |
| 86 | + ./src/%/* | |
| 87 | + | |
| 88 | + @$(MAKE) -C src/$(basename $(notdir $@)) $@ | |
| 89 | + | |
| 90 | + | |
| 83 | 91 | $(DESTDIR)$(libdir)/%@DLLEXT@: \ |
| 84 | 92 | $(DEPENDS) \ |
| 85 | 93 | ./src/%/* |
| ... | ... | @@ -110,6 +118,11 @@ Release: \ |
| 110 | 118 | $(BINRLS)/lib3270@DLLEXT@ \ |
| 111 | 119 | $(BINRLS)/$(PACKAGE_TARNAME)@EXEEXT@ |
| 112 | 120 | |
| 121 | +pot: \ | |
| 122 | + $(POTDIR)/lib3270.pot \ | |
| 123 | + $(POTDIR)/pw3270.pot | |
| 124 | + | |
| 125 | + | |
| 113 | 126 | install: \ |
| 114 | 127 | $(DESTDIR)$(libdir)/lib3270@DLLEXT@ \ |
| 115 | 128 | $(DESTDIR)$(libdir)/$(PACKAGE_TARNAME)@EXEEXT@ |
| ... | ... | @@ -153,5 +166,7 @@ clean: \ |
| 153 | 166 | cleanRelease |
| 154 | 167 | |
| 155 | 168 | @rm -fr $(BINDIR) |
| 169 | + @rm -fr $(POTDIR) | |
| 170 | + | |
| 156 | 171 | |
| 157 | 172 | ... | ... |
src/lib3270/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 | - | ... | ... |
src/pw3270/Makefile.in
| ... | ... | @@ -49,6 +49,8 @@ desktopdir=$(datarootdir)/applications |
| 49 | 49 | |
| 50 | 50 | BASEDIR=@BASEDIR@ |
| 51 | 51 | |
| 52 | +POTDIR=$(BASEDIR)/.pot/$(PACKAGE_TARNAME) | |
| 53 | + | |
| 52 | 54 | OBJDIR=.obj |
| 53 | 55 | OBJDBG=$(OBJDIR)/Debug |
| 54 | 56 | OBJRLS=$(OBJDIR)/Release |
| ... | ... | @@ -66,9 +68,10 @@ LN_S=@LN_S@ |
| 66 | 68 | AMTAR=@AMTAR@ |
| 67 | 69 | SHELL=@SHELL@ |
| 68 | 70 | MKDIR=@MKDIR_P@ |
| 69 | - | |
| 70 | 71 | CC=@CC@ |
| 71 | 72 | LD=@CC@ |
| 73 | +XGETTEXT=@XGETTEXT@ | |
| 74 | +MSGCAT=@MSGCAT@ | |
| 72 | 75 | |
| 73 | 76 | CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ \ |
| 74 | 77 | -Wno-deprecated-declarations \ |
| ... | ... | @@ -113,6 +116,20 @@ $(OBJRLS)/%.o: \ |
| 113 | 116 | -DBUILD_DATE=`date +"0x%Y%m%d"` \ |
| 114 | 117 | -o $@ -c $< |
| 115 | 118 | |
| 119 | +$(POTDIR)/%.pot: %.c | |
| 120 | + | |
| 121 | + @echo $< ... | |
| 122 | + @$(MKDIR) `dirname $@` | |
| 123 | + @$(XGETTEXT) \ | |
| 124 | + --default-domain=$(PACKAGE) \ | |
| 125 | + --language=C \ | |
| 126 | + --keyword=_ \ | |
| 127 | + --keyword=N_ \ | |
| 128 | + --keyword=MSG_:2 \ | |
| 129 | + --output=$@ \ | |
| 130 | + $< | |
| 131 | + | |
| 132 | + @touch $@ | |
| 116 | 133 | |
| 117 | 134 | #---[ Release Targets ]------------------------------------------------------------------ |
| 118 | 135 | |
| ... | ... | @@ -122,6 +139,13 @@ all: \ |
| 122 | 139 | Release: \ |
| 123 | 140 | $(BINRLS)/$(PACKAGE_TARNAME)$(EXEEXT) |
| 124 | 141 | |
| 142 | +$(BASEDIR)/.pot/pw3270.pot: \ | |
| 143 | + $(foreach SRC, $(basename $(LIB_SOURCES) $(APP_SOURCES)), $(POTDIR)/$(SRC).pot) | |
| 144 | + | |
| 145 | + @rm -f $@ | |
| 146 | + @mkdir -p `dirname $@` | |
| 147 | + @$(MSGCAT) --sort-output $^ > $@ | |
| 148 | + | |
| 125 | 149 | $(BINRLS)/$(PACKAGE_TARNAME)$(EXEEXT): \ |
| 126 | 150 | $(BINRLS)/$(LIBNAME) \ |
| 127 | 151 | $(foreach SRC, $(basename $(APP_SOURCES)), $(OBJRLS)/$(SRC).o) | ... | ... |