-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
59 lines (46 loc) · 1.2 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
51
52
53
54
55
56
57
58
59
# Makefile for doc-kit
#
# Copyright (C) 2018 SUSE Linux GmbH
#
# Author:
# Stefan Knorr <[email protected]>
#
ifndef PREFIX_BIN
PREFIX := /usr/bin
endif
ifndef PREFIX_EXTRA
PREFIX := /usr/share
endif
SHELL := /bin/bash
PACKAGE := doc-kit
CDIR := $(shell pwd)
BUILD_DIR := build
CBUILD_DIR := $(CDIR)/$(BUILD_DIR)
INSTALL_EXTRA := doc/packages/doc-kit
# project version number
VERSION := 0.5
.PHONY: build install dist clean
all: dist
build/doc-kit: bin/doc-kit $(BUILD_DIR)
cp $< $@
build/LICENSE: LICENSE $(BUILD_DIR)
cp $< $@
build/README.md: README.md $(BUILD_DIR)
cp $< $@
install: $(INSTALL_EXTRA)
install -m755 bin/doc-kit $(PREFIX_BIN)
install -m644 LICENSE $(PREFIX_EXTRA)/$(INSTALL_EXTRA)
install -m644 README.md $(PREFIX_EXTRA)/$(INSTALL_EXTRA)
$(INSTALL_DIR) $(BUILD_DIR):
@mkdir -p $@
dist: build/doc-kit build/README.md build/LICENSE
@tar cfjhP $(PACKAGE)-$(VERSION).tar.bz2 \
--transform 's:^$(CBUILD_DIR):$(PACKAGE)-$(VERSION):' \
$(CBUILD_DIR)
@echo "Successfully created $(PACKAGE)-$(VERSION).tar.bz2"
# -C $(BUILD_DIR) \
#
clean:
@rm -rf $(BUILD_DIR) 2> /dev/null || echo
@rm $(PACKAGE)-*.tar.bz2 2> /dev/null || echo
@echo "All deleted."