From 6a31f4b48b6697b7d257adb9c0f591736ce14fdc Mon Sep 17 00:00:00 2001 From: bdheeman Date: Sat, 28 Jun 2014 10:05:02 +0530 Subject: [PATCH] Fix install permissions, errors and, or omissions --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 633f54ac..19f53c12 100644 --- a/Makefile +++ b/Makefile @@ -45,13 +45,16 @@ clean: rm -f lib/*.o libmist.so libmist.a rm -rf ./docs +distclean: clean + install: libmist.so libmist.a lib/*.h mkdir -p $(DESTDIR)$(includedir)/mist - install lib/*.h $(DESTDIR)$(includedir)/mist/ - install libmist.so $(DESTDIR)$(libdir)/libmist.so - install libmist.a $(DESTDIR)$(libdir)/libmist.a + install -m 644 lib/*.h $(DESTDIR)$(includedir)/mist/ + mkdir -p $(DESTDIR)$(libdir) + install -m 644 libmist.a $(DESTDIR)$(libdir)/libmist.a + install -m 644 libmist.so $(DESTDIR)$(libdir)/libmist.so $(POST_INSTALL) - ldconfig + if [ "$$USER" = "root" ]; then ldconfig; else echo "run: sudo ldconfig"; fi uninstall: rm -f $(DESTDIR)$(includedir)/mist/*.h