/[axel]/branches/2.x/Makefile
ViewVC logotype

Contents of /branches/2.x/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (hide annotations) (download)
Tue Nov 11 10:49:10 2008 UTC (4 years, 6 months ago) by phihag-guest
File size: 1993 byte(s)
Chinese translation
1 appaji-guest 2 ###########################
2     ## Makefile for Axel ##
3     ## ##
4     ## Copyright 2001 Lintux ##
5     ###########################
6    
7    
8     ### DEFINITIONS
9    
10 appaji-guest 4 -include Makefile.settings
11 appaji-guest 2
12     .SUFFIXES: .po .mo
13    
14     # Add your translation here..
15 phihag-guest 59 MOFILES = nl.mo de.mo ru.mo zh_cn.mo
16 appaji-guest 2
17    
18     all: $(OUTFILE)
19     install: install-bin install-etc install-man
20     uninstall: uninstall-bin uninstall-etc uninstall-man
21    
22     ifdef I18N
23     all: $(MOFILES)
24     install: install-i18n
25     uninstall: uninstall-i18n
26     endif
27    
28     clean:
29     rm -f *.o $(OUTFILE) search core *.mo
30    
31     distclean: clean
32     rm -f Makefile.settings config.h
33    
34     install-man:
35     mkdir -p $(DESTDIR)$(MANDIR)/man1/
36     cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
37 phihag-guest 59 mkdir -p $(DESTDIR)$(MANDIR)/zh_CN/
38     cp axel_zh_CN.1 $(DESTDIR)$(MANDIR)/zh_CN/man1/axel.1
39 appaji-guest 2
40     uninstall-man:
41     rm -f $(MANDIR)/man1/axel.1
42 phihag-guest 59 rm -f $(MANDIR)/zh_CN/man1/axel.1
43 appaji-guest 2
44     install-etc:
45     mkdir -p $(DESTDIR)$(ETCDIR)/
46     cp axelrc.example $(DESTDIR)$(ETCDIR)/axelrc
47    
48     uninstall-etc:
49     rm -f $(ETCDIR)/axelrc
50    
51     ### MAIN PROGRAM
52    
53     $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
54     $(CC) axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o -o $(OUTFILE) $(LFLAGS)
55     ifndef DEBUG
56     -$(STRIP) $(OUTFILE)
57     endif
58    
59     .c.o:
60     $(CC) -c $*.c -o $*.o -Wall $(CFLAGS)
61    
62     install-bin:
63     mkdir -p $(DESTDIR)$(BINDIR)/
64     cp $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
65    
66     uninstall-bin:
67     rm -f $(BINDIR)/$(OUTFILE)
68    
69     tar: distclean
70     x=`pwd | sed -e 's/\/.*\///'`; \
71     cd ..; \
72     tar czf $$x.tar.gz $$x
73    
74    
75     ### I18N FILES
76    
77     %.po:
78     -@mv $@ $@.bak
79     xgettext -k_ -o$@ *.[ch]
80     @if [ -e $@.bak ]; then \
81     echo -n Merging files...; \
82     msgmerge -vo $@.combo $@.bak $@; \
83     rm -f $@ $@.bak; \
84     mv $@.combo $@; \
85     fi
86    
87     .po.mo: $@.po
88     msgfmt -vo $@ $*.po
89    
90     install-i18n:
91     @echo Installing locale files...
92     @for i in $(MOFILES); do \
93     mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
94     cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
95     done
96    
97     uninstall-i18n:
98     cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5