CVS: Makefile improvements

Jakson Aquino jaksonaquino at yahoo.com.br
Tue Feb 22 16:00:13 CET 2005


Hi Bernhard,

>Jakson: If you like, I can give you CVS writte
access, this probably
>will make it easier for you to update the
translations.

Yes, I do. I can update the .po files before the next
release of Statist.

>Which version of msgmerge is needed at least?
>msgmerge (GNU gettext) 0.10.40
>does not have the -U flag,
>and msgmerge (GNU gettext-tools) 0.13.1 has it.

I'm sorry, but I don't know. I use Fedora Core 2,
which comes with msgmerge (GNU gettext-tools) 0.14.1.

I wrote the Makefile for the po directory after
reading some tutorials on gettext and the gettext info
pages. Looking at the po directory of some programs, I
could see that they have a very complicated Makefile
(probably written automatically by some tool). The po
directories also come with .gmo files. Regarding the
.gmo files, the gettext info page says:

  "Files ending with `.gmo' are really MO files, when
   it is known that these files use the GNU format"

Since some people might not have the gettext tools, I
can change the Makefile to produce the object files
with the extension .gmo, and, install them as .mo.
While shipping Statist, we could include the already
compiled .gmo files.

>Another possible improvement would be to use one
place
>to configure the installation prefix
"/usr/share/locale"
>and document it. 

Well, you already solved this with the Makefile.inc.
The ideal is that the user can choose the PREFIX and
everything else becomes automatically set. Perhaps we
still can make some small changes in the Makefiles:


Makefile.inc
------------------------------------------------------
#if you have root privileges choose one of the
following prefixes:
#PREFIX = /usr/local
PREFIX  = /usr

#if you can't become root, uncomment the following
line:
#PREFIX = $$HOME
------------------------------------------------------



src/Makefile
------------------------------------------------------
INSTALLDIR = $(PREFIX)/bin
LOCALEDIR = $(PREFIX)/share/locale
DOCDIR = $(PREFIX)/share/doc/statist

EXTRACFLAGS = -DLOCALEDIR='"$(LOCALE)"' >> PROBLEM
HERE! <<

install: $(MAIN)
	install -d $(PREFIX)/bin
	install -s statist $(PREFIX)/bin/
	(cd ../doc; make PREFIX=$(PREFIX) install)
	(cd ../po; make PREFIX=$(LOCALE) install)

uninstall:
	rm -f $(PREFIX)/bin/statist
	(cd ../doc; make PREFIX=$(PREFIX) uninstall)
	(cd ../po; make PREFIX=$(LOCALE) uninstall)


------------------------------------------------------




po/Makefile:
------------------------------------------------------
#PREFIX = $(PREFIX)/share/locale

POSTFIX = /LC_MESSAGES/
POSTFIXMO = $(POSTFIX)/statist.mo

install:
	install -d $(PREFIX)/pt_BR$(POSTFIX)
	install -d $(PREFIX)/de$(POSTFIX)
	install -d $(PREFIX)/es$(POSTFIX)
	install -d $(PREFIX)/it$(POSTFIX)
	cp pt_BR.gmo $(PREFIX)/pt_BR$(POSTFIXMO)
	cp de_DE.gmo $(PREFIX)/de$(POSTFIXMO)
	cp es_ES.gmo $(PREFIX)/es$(POSTFIXMO)
	cp it_IT.gmo $(PREFIX)/it$(POSTFIXMO)

uninstall:
	rm -f $(PREFIX)/pt_BR$(POSTFIXMO)
	rm -f $(PREFIX)/de$(POSTFIXMO)
	rm -f $(PREFIX)/es$(POSTFIXMO)
	rm -f $(PREFIX)/it$(POSTFIXMO)

------------------------------------------------------

The only problem that I got with the above lines was
that EXTRACFLAGS = -DLOCALEDIR='"$(LOCALE)"' didn't
work. That's, EXTRACFLAGS didn't become
"/usr/share/locale". If the user isn't using the
default "/usr" prefix, it'll have to set both PREFIX
and EXTRACFLAGS.

Best,

Jakson

 --- Bernhard Reiter <bernhard at intevation.de>
escreveu: 
> I have made a couple of improvements to the build
> system in CVS.
> Now it is a lot easier for me to test the
> translations
> and I saw statist in Portugese and Spanish: Very
> nice!
> 




	
	
		
_______________________________________________________ 
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis



More information about the Statist-list mailing list