/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 96 - (hide annotations) (download)
Wed Apr 1 21:55:06 2009 UTC (4 years, 1 month ago) by phihag-guest
File size: 2338 byte(s)
Fix name of simplified 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 96 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 phihag-guest 56 rm -f Makefile.settings config.h axel-*.tar axel-*.tar.gz axel-*.tar.bz2
33 appaji-guest 2
34     install-man:
35     mkdir -p $(DESTDIR)$(MANDIR)/man1/
36     cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
37 appaji 91 mkdir -p $(DESTDIR)$(MANDIR)/zh_CN/man1/
38 phihag-guest 76 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 76 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 phihag-guest 56 $(CC) *.o -o $(OUTFILE) $(LFLAGS)
55 appaji-guest 2 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 phihag-guest 56 tar:
70     version=$$(sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h) && \
71 appaji 90 tar --create --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po *.1 configure Makefile axelrc.example axel.spec gui API CHANGES COPYING CREDITS README && \
72 phihag-guest 56 gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
73     bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
74 appaji-guest 2
75    
76     ### I18N FILES
77    
78     %.po:
79     -@mv $@ $@.bak
80     xgettext -k_ -o$@ *.[ch]
81     @if [ -e $@.bak ]; then \
82     echo -n Merging files...; \
83     msgmerge -vo $@.combo $@.bak $@; \
84     rm -f $@ $@.bak; \
85     mv $@.combo $@; \
86     fi
87    
88     .po.mo: $@.po
89     msgfmt -vo $@ $*.po
90    
91     install-i18n:
92     @echo Installing locale files...
93     @for i in $(MOFILES); do \
94     mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
95     cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
96     done
97    
98     uninstall-i18n:
99     cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5