/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 90 - (show annotations) (download)
Mon Jan 12 06:44:08 2009 UTC (4 years, 4 months ago) by appaji
File size: 2333 byte(s)
Include *.1 instead of axel.1 only in tarball
1 ###########################
2 ## Makefile for Axel ##
3 ## ##
4 ## Copyright 2001 Lintux ##
5 ###########################
6
7
8 ### DEFINITIONS
9
10 -include Makefile.settings
11
12 .SUFFIXES: .po .mo
13
14 # Add your translation here..
15 MOFILES = nl.mo de.mo ru.mo zh_cn.mo
16
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 axel-*.tar axel-*.tar.gz axel-*.tar.bz2
33
34 install-man:
35 mkdir -p $(DESTDIR)$(MANDIR)/man1/
36 cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
37 mkdir -p $(DESTDIR)$(MANDIR)/zh_CN/
38 cp axel_zh_CN.1 $(DESTDIR)$(MANDIR)/zh_CN/man1/axel.1
39
40 uninstall-man:
41 rm -f $(MANDIR)/man1/axel.1
42 rm -f $(MANDIR)/zh_CN/man1/axel.1
43
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) *.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:
70 version=$$(sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h) && \
71 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 gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
73 bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
74
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