/[cmucl]/src/lisp/GNUmakefile
ViewVC logotype

Diff of /src/lisp/GNUmakefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33.16.2 by rtoy, Thu Feb 25 22:01:11 2010 UTC revision 1.39 by rtoy, Thu Oct 14 17:47:12 2010 UTC
# Line 1  Line 1 
1  # $Header$  # $Header$
2    
3  all: lisp.nm translations  all: lisp.nm
4    
5  -include internals.inc  -include internals.inc
6  include Config  include Config
# Line 34  lisp: ${OBJS} version.o Line 34  lisp: ${OBJS} version.o
34    
35  # Create a library out of all the object files so we can build an  # Create a library out of all the object files so we can build an
36  # executable.  However, for Solaris, we need to remove exec-init.o  # executable.  However, for Solaris, we need to remove exec-init.o
37  # because the linker will add the write symbols in.  # because the linker will define symbols with the correct addresses.
38  lisp.a: version.o ${OBJS}  # Also, we need to add EXEC_FINAL on Solaris to define
39          ar crs lisp.a version.o ${OBJS}  # builtin_image_flag with the correct value.
40  ifdef FEATURE_SOLARIS  lisp.a: version.o ${OBJS} ${EXEC_FINAL_OBJ}
41            ar crs lisp.a ${OBJS} version.o
42    ifneq (${EXEC_FINAL_OBJ},)
43          ar d lisp.a exec-init.o          ar d lisp.a exec-init.o
44            ar r lisp.a ${EXEC_FINAL_OBJ}
45  endif  endif
46    
47  version:  version:
# Line 69  Depends: ${SRCS} Line 72  Depends: ${SRCS}
72  LOCALES=en@piglatin ko  LOCALES=en@piglatin ko
73    
74  # Convert locale names to the appropriate path where we want the mo files to go.  # Convert locale names to the appropriate path where we want the mo files to go.
75  LOCALE_MO=$(patsubst %, ../i18n/locale/%/LC_MESSAGES/cmucl.mo, $(LOCALES))  LOCALE_DIRS = $(patsubst %, i18n/locale/%/LC_MESSAGES, $(LOCALES))
76    
77  translations: $(LOCALE_MO)  # When processing the translations, we merge the po file from the src
78    # directory with the appropriate pot file.  The result is placed in
79    # the build directory.  Then we compare the original po file with the
80    # newly generated one (but sorting both before comparing).  If they
81    # are different we print out a note so that we know to look into it
82    # and decide if the po file in the src directory needs to be updated.
83    #
84    # The sorting is done so that differences in order of the lines is not
85    # important.  In particular, msgmerge on OSX wants to put the
86    # Language: line after the Content-Transfer-Encoding line.  But on
87    # FreeBSD, it moves the line to after the Language-Team line.  This
88    # makes things messy.  Hence, sort and diff.
89    translations:
90            for pot in ../../src/i18n/locale/*.pot; do \
91              for po in $(LOCALE_DIRS); do \
92                d=`dirname $$pot`; \
93                f=`basename $$pot .pot`; \
94                echo ; \
95                echo '***' Processing $$f.pot:  $$po; \
96                msgmerge -v ../../src/$$po/$$f.po $$pot -o ../$$po/$$f.po; \
97                msgfmt -v  ../$$po/$$f.po -o ../$$po/$$f.mo; \
98                sort < ../$$po/$$f.po > /tmp/$$$$-updated-$$f.po; \
99                sort < ../../src/$$po/$$f.po > /tmp/$$$$-orig-$$f.po; \
100                diff -uwB /tmp/$$$$-orig-$$f.po /tmp/$$$$-updated-$$f.po || echo "Warning:  $$po/$$f.po changed"; \
101                rm -f /tmp/$$$$-updated-$$f.po /tmp/$$$$-orig-$$f.po; \
102              done; done
103    
104  .PHONY : translations  .PHONY : translations
105    
106  # Create the mo files  # Like translations, but we don't compute the diff.  We just overwrite
107  ../i18n/locale/%/LC_MESSAGES/cmucl.mo : ../../src/i18n/locale/%/LC_MESSAGES/cmucl.po  # the po files in the repository so that we can tell if the
108          -msgfmt -v $^ -o $@  # translations have changed and need to be updated.  (This is what the
109    # old translations used to do.)
110  # Update the translations with the template  translations-update:
111  ../../src/i18n/locale/%/LC_MESSAGES/cmucl.po : ../../src/i18n/locale/cmucl.pot          for pot in ../../src/i18n/locale/*.pot; do \
112          msgmerge -v $@ $^ -o $@            for po in $(LOCALE_DIRS); do \
113                d=`dirname $$pot`; \
114                f=`basename $$pot .pot`; \
115                touch ../../src/$$po/$$f.po; \
116                echo ; \
117                echo '***' Processing $$f.pot:  $$po; \
118                msgmerge -v ../../src/$$po/$$f.po $$pot -o ../../src/$$po/$$f.po; \
119                msgfmt -v  ../../src/$$po/$$f.po -o ../$$po/$$f.mo; \
120              done; done
121    

Legend:
Removed from v.1.33.16.2  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.5