mkcatdefs/gencat message catalogue files on OSX

10 messages Options
Embed this post
Permalink
Greg Boone

mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Traian Stanev

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Greg Boone

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Jack Lee-3

Re: RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi Gerg,

It is under Thirdparty\linux\mkcatdefs\src.


Greg Boone wrote:

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________ fdo-internals mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fdo-internals


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Greg Boone

RE: RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Oh good… I will look at that and see if I can compile it.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jack Lee
Sent: Saturday, February 14, 2009 3:08 PM
To: FDO Internals Mail List
Subject: Re: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

Hi Gerg,

It is under Thirdparty\linux\mkcatdefs\src.


Greg Boone wrote:

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 

 


 
_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
  

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Traian Stanev

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
In reply to this post by Greg Boone
Some javascript/style in this post has been disabled (why?)

 

If the messages never get localized, there is no need to keep them in a separate catalog file (which is different, and generated differently on each platform). Instead, we can simplify our lives by sticking all the messages in an array of strings in a header file. Then, there would be no need to run the preprocessing step of generating the catalog. We can also simplify and/or remove some of the code that does message lookups as well – that code needs some work anyway, even if we don’t do anything else, because it generates gazillions of warnings on g++ 4.1 and higher, due to not being const correct. I can volunteer for that work (of course we have to figure out what exactly to do about it first).

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 3:06 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Greg Boone

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

If you could write up an RFC and circulate for discussion, that would be great.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 6:34 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

If the messages never get localized, there is no need to keep them in a separate catalog file (which is different, and generated differently on each platform). Instead, we can simplify our lives by sticking all the messages in an array of strings in a header file. Then, there would be no need to run the preprocessing step of generating the catalog. We can also simplify and/or remove some of the code that does message lookups as well – that code needs some work anyway, even if we don’t do anything else, because it generates gazillions of warnings on g++ 4.1 and higher, due to not being const correct. I can volunteer for that work (of course we have to figure out what exactly to do about it first).

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 3:06 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Greg Boone

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
In reply to this post by Traian Stanev
Some javascript/style in this post has been disabled (why?)

Right now the mkcatdefs issue is blocking progress. Jack/Traian, if you can provide any steps on how to build it on macosx, that would be appreciated.

 

Greg

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Jack Lee-3

Re: RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Hi Greg,

There is a build script in the directory where the source is located. Were there compile problems?


Greg Boone wrote:

Right now the mkcatdefs issue is blocking progress. Jack/Traian, if you can provide any steps on how to build it on macosx, that would be appreciated.

 

Greg

 

From: [hidden email] [[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________ fdo-internals mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fdo-internals


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals
Traian Stanev

RE: mkcatdefs/gencat message catalogue files on OSX

Reply Threaded More More options
Print post
Permalink
In reply to this post by Greg Boone
Some javascript/style in this post has been disabled (why?)

 

I’ll do that.

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 6:52 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

If you could write up an RFC and circulate for discussion, that would be great.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 6:34 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

If the messages never get localized, there is no need to keep them in a separate catalog file (which is different, and generated differently on each platform). Instead, we can simplify our lives by sticking all the messages in an array of strings in a header file. Then, there would be no need to run the preprocessing step of generating the catalog. We can also simplify and/or remove some of the code that does message lookups as well – that code needs some work anyway, even if we don’t do anything else, because it generates gazillions of warnings on g++ 4.1 and higher, due to not being const correct. I can volunteer for that work (of course we have to figure out what exactly to do about it first).

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 3:06 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

Where did you get the source code from mkcatdefs?

 

No…  I have never heard of anyone localizing the messages from FDO.

 

As for the Fdo/Nls file names, maybe that is something we can fix as a part of the side-work for OSX.

 

Greg

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Traian Stanev
Sent: Saturday, February 14, 2009 2:43 PM
To: [hidden email]
Subject: [fdo-internals] RE: mkcatdefs/gencat message catalogue files on OSX

 

 

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.

 

Traian

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Greg Boone
Sent: Saturday, February 14, 2009 2:31 PM
To: [hidden email]
Subject: [fdo-internals] mkcatdefs/gencat message catalogue files on OSX

 

Hi All,

 

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)

 

clean:

                @rm -rf $(CATDIR)/*.cat 

                @rm -rf *.msf

 

catalog_init::

                @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

 

#install data

install :

                @if [ ! -d $(INSTALL_DIR) ]; then mkdir -p $(INSTALL_DIR); fi

                @cp -u -f $(CATDIR)/FDOMessage.cat $(INSTALL_DIR)

 

uninstall :

                @rm -f $(INSTALL_DIR)/FDOMessage.cat

 


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals