Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 46 lines (34 sloc) 1.219 kB
c66848f @falconindy remove config.mk
authored
1 # expac - an alpm data dump tool
2 VERSION = $(shell git describe --always)
3
4 # paths
5 PREFIX ?= /usr/local
7654890 @falconindy cleanup makefile, ensure usage of implicit build rules
authored
6 MANPREFIX ?= $(PREFIX)/share/man
c66848f @falconindy remove config.mk
authored
7
8 # compiler flags
684aca4 @falconindy make the config parser suck less
authored
9 CPPFLAGS := -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE $(CPPFLAGS)
10 CFLAGS := -std=c11 -g -pedantic -Wall -Wextra -Wno-missing-field-initializers $(CFLAGS)
7654890 @falconindy cleanup makefile, ensure usage of implicit build rules
authored
11 LDLIBS = -lalpm
9cde8d2 @falconindy initial commit
authored
12
e35d621 @falconindy add missing files to dist target
authored
13 DISTFILES = expac.c expac.h conf.c conf.h util.h README.pod
bad9776 @falconindy build-sys: cleanup
authored
14
6461d05 @falconindy cleanup makefile, add an upload target
authored
15 all: expac doc
16
17 expac: \
c16a1ce @falconindy Reorg a bit, introduce a control struct
authored
18 expac.c \
19 conf.c conf.h \
20 util.h
21
f827493 @falconindy have a man page
authored
22 doc: expac.1
23 expac.1: README.pod
7654890 @falconindy cleanup makefile, ensure usage of implicit build rules
authored
24 pod2man --section=1 --center="expac manual" --name="EXPAC" --release="expac $(VERSION)" $< $@
f827493 @falconindy have a man page
authored
25
9cde8d2 @falconindy initial commit
authored
26 install: expac
6461d05 @falconindy cleanup makefile, add an upload target
authored
27 install -Dm755 expac $(DESTDIR)$(PREFIX)/bin/expac
28 install -Dm644 expac.1 $(DESTDIR)$(MANPREFIX)/man1/expac.1
9cde8d2 @falconindy initial commit
authored
29
6461d05 @falconindy cleanup makefile, add an upload target
authored
30 expac-$(VERSION).tar.gz: dist
9cde8d2 @falconindy initial commit
authored
31 dist: clean
7654890 @falconindy cleanup makefile, ensure usage of implicit build rules
authored
32 mkdir expac-$(VERSION)
33 cp $(DISTFILES) expac-$(VERSION)
34 sed "s/^VERSION = .*/VERSION = $(VERSION)/" Makefile > expac-$(VERSION)/Makefile
35 tar cf - expac-$(VERSION) | gzip -9 > expac-$(VERSION).tar.gz
36 rm -rf expac-$(VERSION)
9cde8d2 @falconindy initial commit
authored
37
6461d05 @falconindy cleanup makefile, add an upload target
authored
38 upload: expac-$(VERSION).tar.gz
39 gpg --detach-sign expac-$(VERSION).tar.gz
40 scp expac-$(VERSION).tar.gz expac-$(VERSION).tar.gz.sig code.falconindy.com:archive/expac/
41
9cde8d2 @falconindy initial commit
authored
42 clean:
c16a1ce @falconindy Reorg a bit, introduce a control struct
authored
43 $(RM) *.o expac expac.1
9cde8d2 @falconindy initial commit
authored
44
bad9776 @falconindy build-sys: cleanup
authored
45 .PHONY: all clean dist doc install doc
Something went wrong with that request. Please try again.