[fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX
traian.stanev at autodesk.com
Sat Feb 14 14:42:31 EST 2009
I *think* I recompiled mkcatdefs for OSX and generated the message file on my Mac. I forgot how I did it, but I can go through it again to retrace my steps. As far as I remember, it wasn't too painful.
At the time, I was actually going to complain about the whole process of generating the message catalog like that instead of having all the messages in a header of some sort... A related question, do FDO error messages from the generated catalog ever get localized to languages other than English?
Another thing that is really bad (at least on OSX) is that the Fdo/Nls code has header files which have the same names as standard C headers!! This was confusing the hell out of g++ since other standard C headers end up including those header files from FDO rather than from e.g. /usr/include.
I never really got FDO to compile cleanly on OSX, but admittedly I didn't spend too long on it.
From: fdo-internals-bounces at lists.osgeo.org [mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: fdo-internals at lists.osgeo.org
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX
When generating our FDO message catalogue files on Linux we use the following Makefile.am specification which in turn relies on mkcatdefs and gencat. However on OSX, mkcatdefs is not available. Are there any suggestions out there on how we can modify the message catalogue compilation process to work with OSX?
AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = FDOMessage.mc resource.h MessageStatic.rc
CATDIR = ../../nls/linux/en_US
CATALOGS = FDOMessage.mc
CATALOGS_CAT = $(patsubst %.mc,$(CATDIR)/%.cat,$(CATALOGS))
all: catalog_init $(CATALOGS_CAT)
@rm -rf $(CATDIR)/*.cat
@rm -rf *.msf
@if [ ! -d $(CATDIR) ]; then mkdir -p $(CATDIR); fi
$(CATALOGS_CAT) : $(CATDIR)/%.cat : %.msf
@rm -f "../../Inc/$(basename $(notdir $<)).h"
@echo "$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir $<)) $< | gencat $@"; \
$(FDOTHIRDPARTY)/linux/mkcatdefs/mkcatdefs $(basename $(notdir $<)) $< > $(addsuffix .tmp, $(basename $(notdir $<))); \
gencat $@ $(addsuffix .tmp, $(basename $(notdir $<))); \
sed -e '/#include/d' -e '/MF_/s/"\(.*\)\.cat"/\1_cat/' \
$(addsuffix _msg.h, $(basename $(notdir $<))) > \
../../Inc/$(addsuffix _msg.h, $(basename $(notdir $<)))
@rm $(addsuffix _msg.h, $(basename $(notdir $<))) \
$(addsuffix .tmp, $(basename $(notdir $<)))
@mv ../../Inc/$(basename $(notdir $<))_msg.h ../../Inc/FdoMessage.h
%.msf : %.mc
@../McToMsf/McToMsf $(basename $(notdir $<)).mc $(basename $(notdir $<)).msf "*" FDO
INSTALL_DIR = $(prefix)/nls
@if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi
@cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)
@rm -f $(INSTALL_DIR)/FDOMessage.cat
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fdo-internals