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

Contents of /src/lisp/GNUmakefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.39 - (show annotations)
Thu Oct 14 17:47:12 2010 UTC (3 years, 6 months ago) by rtoy
Branch: MAIN
CVS Tags: GIT-CONVERSION, cross-sol-x86-merged, cross-sol-x86-base, snapshot-2010-12, snapshot-2010-11, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, cross-sol-x86-2010-12-20, cross-sparc-branch-base, HEAD
Branch point for: cross-sparc-branch, cross-sol-x86-branch
Changes since 1.38: +17 -1 lines
tools/build.sh:
o Add -U option.  This causes the updated translations to overwrite
  the *.po files in source tree.  Without -U, the diff of the changes
  are printed, as before.  The -U option is useful to prepare the po
  files for checking in to the CVS repository.

lisp/GNUmakefile:
o Put back the original translations target and rule, but rename the
  target to tranlations-update.  This allows developers to overwrite
  the translations in the source tree, ready for analysis or checkin,
  as appropriate.
1 # $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/GNUmakefile,v 1.39 2010/10/14 17:47:12 rtoy Exp $
2
3 all: lisp.nm
4
5 -include internals.inc
6 include Config
7
8 SRCS = lisp.c coreparse.c alloc.c monitor.c print.c interr.c \
9 vars.c parse.c interrupt.c search.c validate.c globals.c \
10 dynbind.c breakpoint.c regnames.c backtrace.c save.c purify.c \
11 runprog.c time.c exec-init.c \
12 ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
13
14 OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
15
16 ### Don't look in RCS for the files, because we might not want the latest.
17 %: RCS/%,v
18
19 lisp.nm: lisp lisp.a
20 echo 'Map file for lisp version ' `cat version` > ,lisp.nm
21 $(NM) lisp | grep -v " [F] " >> ,lisp.nm
22 mv ,lisp.nm lisp.nm
23
24 version.o : version.c version
25 echo '1 + ' `cat version` | bc > ,version
26 mv ,version version
27 $(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $<
28
29 lisp: ${OBJS} version.o
30 $(CC) -g ${OS_LINK_FLAGS} -o ,lisp \
31 ${OBJS} version.o \
32 ${OS_LIBS} -lm
33 mv -f ,lisp lisp
34
35 # 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
37 # because the linker will define symbols with the correct addresses.
38 # Also, we need to add EXEC_FINAL on Solaris to define
39 # builtin_image_flag with the correct value.
40 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
44 ar r lisp.a ${EXEC_FINAL_OBJ}
45 endif
46
47 version:
48 echo 0 > version
49
50 internals.h internals.inc:
51 @echo "You must run genesis to create internals.h!"
52 @false
53
54 clean:
55 rm -f Depends *.o lisp lisp.nm core
56 echo 'Map file for lisp version 0' > lisp.nm
57
58 depend: Depends
59
60 Depends: ${SRCS}
61 $(DEPEND) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $^ > ,depends
62 mv ,depends Depends
63
64 -include Depends
65
66 # Find all directories in ../i18n/locale. These are the locales we
67 # currently support.
68
69 # This would be a nice way to do it so we don't have to keep track of
70 # the directories, but Solaris' find doesn't grok -depth 1
71 #LOCALES=$(patsubst ../i18n/locale/%, %, $(shell find ../i18n/locale -type d -depth 1))
72 LOCALES=en@piglatin ko
73
74 # Convert locale names to the appropriate path where we want the mo files to go.
75 LOCALE_DIRS = $(patsubst %, i18n/locale/%/LC_MESSAGES, $(LOCALES))
76
77 # 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
105
106 # Like translations, but we don't compute the diff. We just overwrite
107 # the po files in the repository so that we can tell if the
108 # translations have changed and need to be updated. (This is what the
109 # old translations used to do.)
110 translations-update:
111 for pot in ../../src/i18n/locale/*.pot; do \
112 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

  ViewVC Help
Powered by ViewVC 1.1.5