-
Notifications
You must be signed in to change notification settings - Fork 39
/
Makefile.am
62 lines (58 loc) · 2.65 KB
/
Makefile.am
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
60
61
62
SUBDIRS = docs include libs clients test server
ACLOCAL_AMFLAGS = -I m4
pkglibexecdir = $(pkglibdir)
pkgsysconfdir = $(sysconfdir)/twin
pkgdata_DATA = BUGS COPYING COPYING.LIB Changelog.txt INSTALL README README.porting twin-current.lsm
dist_pkgsysconf_DATA = twenvrc.sh twinrc
install-exec-hook:
@if echo "$(host_triplet)" | $(GREP) linux >/dev/null 2>&1 ; then \
CMD_LDCONFIG="ldconfig" ; \
elif echo "$(host_triplet)" | $(GREP) freebsd >/dev/null 2>&1 ; then \
CMD_LDCONFIG="ldconfig -R" ; \
else \
CMD_LDCONFIG="" ; \
fi; \
if test "x$$CMD_LDCONFIG" != x ; then \
CMD_ERR1=""; \
CMD_ERR2=""; \
CMD_ERR3=""; \
if id 2>/dev/null | $(EGREP) "^uid=0" >/dev/null 2>&1 ; then \
true; \
else \
CMD_ERR1="installing with non-root user \"`whoami 2>/dev/null`\""; \
fi; \
if test "x$(DESTDIR)" != x ; then \
CMD_ERR2="installing to non-null DESTDIR = \"$(DESTDIR)\""; \
fi; \
if test "x$(host_triplet)" != "x$(build_triplet)" ; then \
CMD_ERR3="cross-compile detected, host system \"$(host_triplet)\" != build system \"$(build_triplet)\""; \
fi; \
if test "x$$CMD_ERR1$$CMD_ERR2$$CMD_ERR3" = x ; then \
echo " $$CMD_LDCONFIG" ; \
$$CMD_LDCONFIG ; \
else \
echo "[33;1m==================================================================="; \
echo "=========================== WARNING ==============================="; \
echo "==================================================================="; \
echo "=== ==="; \
echo "=== cannot run required command \"$$CMD_LDCONFIG\" now. reasons: ==="; \
echo "=== ==="; \
if test "x$$CMD_ERR1" != x ; then \
echo "=== * $$CMD_ERR1"; \
fi; \
if test "x$$CMD_ERR2" != x ; then \
echo "=== * $$CMD_ERR2"; \
fi; \
if test "x$$CMD_ERR3" != x ; then \
echo "=== * $$CMD_ERR3"; \
fi; \
echo "=== ==="; \
echo "=== remember to run \"$$CMD_LDCONFIG\" with root privileges (or reboot) ==="; \
echo "=== after you install twin into its final location, ==="; \
echo "=== otherwise you may receive \"library not found\" errors ==="; \
echo "=== ==="; \
echo "==================================================================="; \
echo "==================================================================="; \
echo "===================================================================[0m"; \
fi; \
fi