This repository has been archived by the owner on Aug 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
50 lines (38 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
TOPDIR = $(shell echo $$PWD)
include $(TOPDIR)/Make.version
include $(TOPDIR)/Make.rules
include $(TOPDIR)/Make.defaults
SUBDIRS := src data
DOCDIR := /share/doc/
all : $(SUBDIRS)
include $(TOPDIR)/Make.coverity
include $(TOPDIR)/Make.scan-build
$(SUBDIRS) :
$(MAKE) -C $@ TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/
clean :
@for x in $(SUBDIRS) ; do $(MAKE) -C $${x} TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ $@ ; done
install :
@for x in $(SUBDIRS) ; do $(MAKE) -C $${x} TOPDIR=$(TOPDIR) SRCDIR=$(TOPDIR)/$@/ $@ ; done
$(INSTALL) -d -m 755 $(INSTALLROOT)$(PREFIX)$(DOCDIR)/dbxtool/
$(INSTALL) -m 644 COPYING $(INSTALLROOT)$(PREFIX)$(DOCDIR)/dbxtool/
.PHONY: $(SUBDIRS) clean install
GITTAG = $(VERSION)
test-archive:
@rm -rf /tmp/dbxtool-$(VERSION) /tmp/dbxtool-$(VERSION)-tmp
@mkdir -p /tmp/dbxtool-$(VERSION)-tmp
@git archive --format=tar $(shell git branch | awk '/^*/ { print $$2 }') | ( cd /tmp/dbxtool-$(VERSION)-tmp/ ; tar x )
@git diff | ( cd /tmp/dbxtool-$(VERSION)-tmp/ ; patch -s -p1 -b -z .gitdiff )
@mv /tmp/dbxtool-$(VERSION)-tmp/ /tmp/dbxtool-$(VERSION)/
@dir=$$PWD; cd /tmp; tar -c --bzip2 -f $$dir/dbxtool-$(VERSION).tar.bz2 dbxtool-$(VERSION)
@rm -rf /tmp/dbxtool-$(VERSION)
@echo "The archive is in dbxtool-$(VERSION).tar.bz2"
tag:
git tag -s dbxtool-$(GITTAG) refs/heads/master
archive: tag
@rm -rf /tmp/dbxtool-$(VERSION) /tmp/dbxtool-$(VERSION)-tmp
@mkdir -p /tmp/dbxtool-$(VERSION)-tmp
@git archive --format=tar dbxtool-$(GITTAG) | ( cd /tmp/dbxtool-$(VERSION)-tmp/ ; tar x )
@mv /tmp/dbxtool-$(VERSION)-tmp/ /tmp/dbxtool-$(VERSION)/
@dir=$$PWD; cd /tmp; tar -c --bzip2 -f $$dir/dbxtool-$(VERSION).tar.bz2 dbxtool-$(VERSION)
@rm -rf /tmp/dbxtool-$(VERSION)
@echo "The archive is in dbxtool-$(VERSION).tar.bz2"