This repository was archived by the owner on May 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathinstall.unix.mk
56 lines (42 loc) · 1.93 KB
/
install.unix.mk
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
### install rules follow... ###
$(SYS_LIBDIR)/%.so.$(LIBFULLREV).dbg: $(DESTDIR)/%.so.$(LIBFULLREV).dbg
$(INSTALL) -m 755 $^ $@
$(SYS_LIBDIR)/$(LIBNAME)%.$(LIBFULLREV): $(DESTDIR)/$(LIBNAME)%.$(LIBFULLREV)
$(INSTALL) -m 755 $^ $@
$(SYS_LIBDIR)/$(LIBNAME)%: $(SYS_LIBDIR)/$(LIBNAME)%.$(LIBFULLREV)
$(SYMLINK) -fs $(shell basename $^) $@
$(addprefix $(SYS_INCDIR)/,$(SYS_HEADERS)): $(SYS_INCDIR)/%: $(HDRDIR)/%
$(INSTALL) -m 644 $^ $@
$(addprefix $(SYS_MANDIR)/,$(addsuffix .gz,$(SYS_MANPAGES))): $(SYS_MANDIR)/%.gz: $(MANDIR)/%
mkdir -p $(dir $@)
if [ ! -h $^ ]; then \
$(DEFLATE) < $^ > $@; \
chmod 644 $@; \
else \
$(SYMLINK) -fs $(shell readlink $^).gz $@; \
fi
chown -h $(SYS_USER):$(SYS_GROUP) $@
### release follows... ###
.PHONY: release release_src release_source
release: $(RELEASE_FILES)
tar -acf $(LIBNAME)_v$(LIBFULLREV)_`date +%Y-%m-%d`_`git rev-parse --verify --short HEAD`_`uname -m`_`uname -s`.tar.bz2 --transform='s#^#$(LIBNAME)_$(LIBFULLREV)/#SH' $^
release_src: release_source
release_source:
rm -f $(LIBNAME)-v$(LIBFULLREV).tgz
tar -avcf $(LIBNAME)-v$(LIBFULLREV).tgz --exclude=config.mk --exclude=.gitignore --exclude=cscope.out --exclude=tags --exclude=.*.dir --exclude=lib --exclude=.build --exclude=html --exclude=manuals --transform='s#^#$(LIBNAME)-$(LIBFULLREV)/#SH' *
### html pages follow... ###
.PHONY: install_html
ifeq ($(SYS_HTMLDIR),)
install_html:
@echo 'Please specify $$(SYS_HTMLDIR) in config.mk'
@false
else
install_html: $(addprefix $(SYS_HTMLDIR)/,$(SYS_HTMLPAGES))
$(addprefix $(SYS_HTMLDIR)/,$(SYS_HTMLPAGES)): $(SYS_HTMLDIR)/%: $(HTMLDIR)/%
@echo "$(INSTALL) -m 644 $^ $@"
@if [ ! -h $^ ]; then \
$(INSTALL) -m 644 $^ $@; \
else \
$(SYMLINK) -fs $(shell readlink $^) $@; \
fi
endif