0d4b755a507a82ab9ed6e0d7efd4f0cd919af2d2
[bitfield] / Makefile
1 INSTALLDIR=/usr/bin
2 VERSION="0.0.1"
3 SOURCES=bitfield bitfield-completions.sh bitfield.vim Makefile
4 DEBSOURCES=bitfield.install bitfield-data.install changelog control rules
5 CONFS=cell.conf powerpc.conf
6
7 all: 
8
9 clean:
10         rm -rf bitfield-${VERSION}
11
12 install: 
13         install -d ${DESTDIR}${INSTALLDIR}
14         install -d ${DESTDIR}/etc/bash_completion.d
15         install -d ${DESTDIR}/usr/share/vim/addons/syntax
16         install -d ${DESTDIR}/etc/bitfield.d
17         install -m 755 -t ${DESTDIR}${INSTALLDIR} bitfield 
18         install -m 644 -D bitfield-completions.sh ${DESTDIR}/etc/bash_completion.d/bitfield
19         install -m 644 -t ${DESTDIR}/usr/share/vim/addons/syntax bitfield.vim
20         install -m 644 -t ${DESTDIR}/etc/bitfield.d $(foreach f,$(CONFS),conf/$(f))
21
22 dist: clean
23         mkdir -p bitfield-${VERSION}/debian
24         mkdir -p bitfield-${VERSION}/conf
25         cp -a ${SOURCES} bitfield-${VERSION}
26         cp -a $(foreach f,$(DEBSOURCES),debian/$(f)) bitfield-${VERSION}/debian
27         cp -a $(foreach f,$(CONFS),conf/$(f)) bitfield-${VERSION}/conf
28         tar zcvf bitfield-${VERSION}.tar.gz bitfield-${VERSION}