/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 118 - (hide annotations) (download)
Wed Jan 6 12:40:49 2010 UTC (3 years, 4 months ago) by phihag-guest
File size: 2279 byte(s)
Add HP-UX, fix Solaris support (Fixes: #312092)
1 appaji-guest 2 ###########################
2     ## Makefile for Axel ##
3     ## ##
4     ## Copyright 2001 Lintux ##
5     ###########################
6    
7     ### DEFINITIONS
8    
9 appaji-guest 4 -include Makefile.settings
10 appaji-guest 2
11     .SUFFIXES: .po .mo
12    
13     # Add your translation here..
14 phihag-guest 96 MOFILES = nl.mo de.mo ru.mo zh_CN.mo
15 appaji-guest 2
16    
17     all: $(OUTFILE)
18     install: install-bin install-etc install-man
19     uninstall: uninstall-bin uninstall-etc uninstall-man
20    
21     clean:
22     rm -f *.o $(OUTFILE) search core *.mo
23    
24     distclean: clean
25 phihag-guest 56 rm -f Makefile.settings config.h axel-*.tar axel-*.tar.gz axel-*.tar.bz2
26 appaji-guest 2
27     install-man:
28     mkdir -p $(DESTDIR)$(MANDIR)/man1/
29     cp axel.1 $(DESTDIR)$(MANDIR)/man1/axel.1
30 appaji 91 mkdir -p $(DESTDIR)$(MANDIR)/zh_CN/man1/
31 phihag-guest 76 cp axel_zh_CN.1 $(DESTDIR)$(MANDIR)/zh_CN/man1/axel.1
32 appaji-guest 2
33     uninstall-man:
34     rm -f $(MANDIR)/man1/axel.1
35 phihag-guest 76 rm -f $(MANDIR)/zh_CN/man1/axel.1
36 appaji-guest 2
37     install-etc:
38     mkdir -p $(DESTDIR)$(ETCDIR)/
39     cp axelrc.example $(DESTDIR)$(ETCDIR)/axelrc
40    
41     uninstall-etc:
42     rm -f $(ETCDIR)/axelrc
43    
44     ### MAIN PROGRAM
45    
46     $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
47 phihag-guest 56 $(CC) *.o -o $(OUTFILE) $(LFLAGS)
48 phihag-guest 118 $(STRIP) $(OUTFILE)
49 appaji-guest 2
50     .c.o:
51 phihag-guest 118 $(CC) -c $*.c -o $*.o $(CFLAGS)
52 appaji-guest 2
53     install-bin:
54     mkdir -p $(DESTDIR)$(BINDIR)/
55     cp $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
56    
57     uninstall-bin:
58     rm -f $(BINDIR)/$(OUTFILE)
59    
60 phihag-guest 56 tar:
61 phihag-guest 118 version=`sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h` && \
62 phihag-guest 113 tar --create --numeric-owner --owner 0 --group 0 --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po *.1 configure Makefile axelrc.example gui API CHANGES COPYING CREDITS README && \
63 phihag-guest 56 gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
64     bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
65 appaji-guest 2
66    
67     ### I18N FILES
68    
69     %.po:
70     -@mv $@ $@.bak
71     xgettext -k_ -o$@ *.[ch]
72     @if [ -e $@.bak ]; then \
73     echo -n Merging files...; \
74     msgmerge -vo $@.combo $@.bak $@; \
75     rm -f $@ $@.bak; \
76     mv $@.combo $@; \
77     fi
78    
79     .po.mo: $@.po
80     msgfmt -vo $@ $*.po
81    
82 phihag-guest 118 i18n-mofiles: $(MOFILES)
83    
84 appaji-guest 2 install-i18n:
85     @echo Installing locale files...
86     @for i in $(MOFILES); do \
87     mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
88     cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
89     done
90    
91     uninstall-i18n:
92     cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5