/[axel]/trunk/Makefile
ViewVC logotype

Contents of /trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 58 - (show annotations) (download)
Tue Oct 14 13:16:13 2008 UTC (4 years, 7 months ago) by phihag-guest
File size: 2200 byte(s)
Yet another regression (Sorry!): Include all files that should be present in a tar (ROADMAP left out intentionally)
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
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
38 uninstall-man:
39 rm -f $(MANDIR)/man1/axel.1
40
41 install-etc:
42 mkdir -p $(DESTDIR)$(ETCDIR)/
43 cp axelrc.example $(DESTDIR)$(ETCDIR)/axelrc
44
45 uninstall-etc:
46 rm -f $(ETCDIR)/axelrc
47
48 ### MAIN PROGRAM
49
50 $(OUTFILE): axel.o conf.o conn.o ftp.o http.o search.o tcp.o text.o
51 $(CC) *.o -o $(OUTFILE) $(LFLAGS)
52 ifndef DEBUG
53 -$(STRIP) $(OUTFILE)
54 endif
55
56 .c.o:
57 $(CC) -c $*.c -o $*.o -Wall $(CFLAGS)
58
59 install-bin:
60 mkdir -p $(DESTDIR)$(BINDIR)/
61 cp $(OUTFILE) $(DESTDIR)$(BINDIR)/$(OUTFILE)
62
63 uninstall-bin:
64 rm -f $(BINDIR)/$(OUTFILE)
65
66 tar:
67 version=$$(sed -n 's/#define AXEL_VERSION_STRING[ \t]*"\([^"]*\)"/\1/p' < axel.h) && \
68 tar --create --transform "s#^#axel-$${version}/#" "--file=axel-$${version}.tar" --exclude-vcs -- *.c *.h *.po configure Makefile axel.1 axelrc.example axel.spec gui API CHANGES COPYING CREDITS README && \
69 gzip --best < "axel-$${version}.tar" > "axel-$${version}.tar.gz" && \
70 bzip2 --best < "axel-$${version}.tar" > "axel-$${version}.tar.bz2"
71
72
73 ### I18N FILES
74
75 %.po:
76 -@mv $@ $@.bak
77 xgettext -k_ -o$@ *.[ch]
78 @if [ -e $@.bak ]; then \
79 echo -n Merging files...; \
80 msgmerge -vo $@.combo $@.bak $@; \
81 rm -f $@ $@.bak; \
82 mv $@.combo $@; \
83 fi
84
85 .po.mo: $@.po
86 msgfmt -vo $@ $*.po
87
88 install-i18n:
89 @echo Installing locale files...
90 @for i in $(MOFILES); do \
91 mkdir -p $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/; \
92 cp $$i $(DESTDIR)$(LOCALE)/`echo $$i | cut -d. -f1`/LC_MESSAGES/axel.mo; \
93 done
94
95 uninstall-i18n:
96 cd $(LOCALE); find . -name axel.mo -exec 'rm' '{}' ';'

  ViewVC Help
Powered by ViewVC 1.1.5