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

Diff of /src/lisp/GNUmakefile

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

revision 1.21.2.1 by gerd, Mon Aug 25 17:06:44 2003 UTC revision 1.39 by rtoy, Thu Oct 14 17:47:12 2010 UTC
# Line 2  Line 2 
2    
3  all: lisp.nm  all: lisp.nm
4    
 CC = gcc  
   
 DEPEND = $(CC) -MM -E  
 DEPEND_FLAGS =  
   
5  -include internals.inc  -include internals.inc
6  include Config  include Config
7    
 ifndef GC_SRC  
 GC_SRC = gc.c  
 endif  
   
8  SRCS = lisp.c coreparse.c alloc.c monitor.c print.c interr.c \  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 \          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 \          dynbind.c breakpoint.c regnames.c backtrace.c save.c purify.c \
11          socket.c runprog.c time.c \          runprog.c time.c exec-init.c \
12          ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}          ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
13    
14  OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))  OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
# Line 25  OBJS = $(patsubst %.c,%.o,$(patsubst %.S Line 16  OBJS = $(patsubst %.c,%.o,$(patsubst %.S
16  ### Don't look in RCS for the files, because we might not want the latest.  ### Don't look in RCS for the files, because we might not want the latest.
17  %: RCS/%,v  %: RCS/%,v
18    
19  lisp.nm: lisp  lisp.nm: lisp lisp.a
20          echo 'Map file for lisp version ' `cat version` > ,lisp.nm          echo 'Map file for lisp version ' `cat version` > ,lisp.nm
21          $(NM) lisp | grep -v " [F] " >> ,lisp.nm          $(NM) lisp | grep -v " [F] " >> ,lisp.nm
22          mv ,lisp.nm lisp.nm          mv ,lisp.nm lisp.nm
23    
24  lisp: version.c ${OBJS} version  version.o : version.c version
25          echo '1 + ' `cat version` | bc > ,version          echo '1 + ' `cat version` | bc > ,version
26          mv ,version version          mv ,version version
27          $(CC) ${CFLAGS} -DVERSION=`cat version` -c $<          $(CC) ${CFLAGS} $(CPPFLAGS) -DVERSION=`cat version` -c $<
28    
29    lisp: ${OBJS} version.o
30          $(CC) -g ${OS_LINK_FLAGS} -o ,lisp \          $(CC) -g ${OS_LINK_FLAGS} -o ,lisp \
31                  ${OBJS} version.o \                  ${OBJS} version.o \
32                  ${OS_LIBS} -lm                  ${OS_LIBS} -lm
33          mv -f ,lisp lisp          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:  version:
48          echo 0 > version          echo 0 > version
49    
 ### Socket.c needs to be compiled with UNIXCONN defined.  
 socket.o: socket.c  
         $(COMPILE.c) -DUNIXCONN $<  
   
50  internals.h internals.inc:  internals.h internals.inc:
51          @echo "You must run genesis to create internals.h!"          @echo "You must run genesis to create internals.h!"
52          @false          @false
53    
54  clean:  clean:
55          rm -f Depends *.o lisp lisp.nm core          rm -f Depends *.o lisp lisp.nm core
56            echo 'Map file for lisp version 0' > lisp.nm
57    
58  depend: Depends  depend: Depends
59    
# Line 59  Depends: ${SRCS} Line 61  Depends: ${SRCS}
61          $(DEPEND) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $^ > ,depends          $(DEPEND) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $^ > ,depends
62          mv ,depends Depends          mv ,depends Depends
63    
64  include Depends  -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    

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

  ViewVC Help
Powered by ViewVC 1.1.5