diff options
author | Andrew Cady <d@cryptonomic.net> | 2021-10-07 17:44:44 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2021-10-08 04:01:58 -0400 |
commit | 90085bacc47ea92cbec6622f9678fc3233e7536f (patch) | |
tree | b69d746de544532a7318b70ab7ba5177c734a868 | |
parent | 19043546f68da0ba42463723b2a2d6e562db5619 (diff) |
"make install" will use sudo
-rw-r--r-- | Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -54,6 +54,10 @@ cscope.out: | |||
54 | clean: | 54 | clean: |
55 | rm -f $(OBJECTS) $(EXECUTABLES) cscope.out gitversion.h | 55 | rm -f $(OBJECTS) $(EXECUTABLES) cscope.out gitversion.h |
56 | 56 | ||
57 | ifneq ($(shell id -u),0) | ||
58 | install: | ||
59 | sudo MAKEFLAGS=$(MAKEFLAGS) -- $(MAKE) install | ||
60 | else | ||
57 | install: tuntox_nostatic | 61 | install: tuntox_nostatic |
58 | install -d -m755 $(DESTDIR)$(bindir) $(DESTDIR)$(etcdir) | 62 | install -d -m755 $(DESTDIR)$(bindir) $(DESTDIR)$(etcdir) |
59 | install -d -m700 $(DESTDIR)$(etcdir)/tuntox | 63 | install -d -m700 $(DESTDIR)$(etcdir)/tuntox |
@@ -65,6 +69,7 @@ ifeq ($(SKIP_SYSTEMCTL),) | |||
65 | systemctl restart tuntox | 69 | systemctl restart tuntox |
66 | systemctl status tuntox | 70 | systemctl status tuntox |
67 | endif | 71 | endif |
72 | endif | ||
68 | 73 | ||
69 | .PHONY: install-debs debs | 74 | .PHONY: install-debs debs |
70 | install-debs: $(DEBS) | 75 | install-debs: $(DEBS) |