[hackers] [sbase] make (un)install || Connor Lane Smith

From: <hg_AT_suckless.org>
Date: Wed, 8 Jun 2011 12:37:06 +0200 (CEST)

changeset: 57:73e26bfe699d
tag: tip
user: Connor Lane Smith <cls_AT_lubutu.com>
date: Wed Jun 08 11:37:00 2011 +0100
files: Makefile config.mk
description:
make (un)install

diff -r a9db33a9bfea -r 73e26bfe699d Makefile
--- a/Makefile Sat Jun 04 14:30:54 2011 +0100
+++ b/Makefile Wed Jun 08 11:37:00 2011 +0100
@@ -59,6 +59,20 @@
         @echo AR -r $@
         @$(AR) -r -c $@ $(LIB)
 
+install:
+ @echo installing executables to $(DESTDIR)$(PREFIX)/bin
+ @mkdir -p $(DESTDIR)$(PREFIX)/bin
+ @cp -f $(BIN) $(DESTDIR)$(PREFIX)/bin
+ @cd $(DESTDIR)$(PREFIX)/bin && chmod 755 $(BIN)
+ @echo installing manual pages to $(DESTDIR)$(MANPREFIX)/man1
+ @mkdir -p $(DESTDIR)$(MANPREFIX)/man1
+ @cp -f $(MAN) $(DESTDIR)$(MANPREFIX)/man1
+ @cd $(DESTDIR)$(MANPREFIX)/man1 && chmod 644 $(MAN)
+
+uninstall:
+ @cd $(DESTDIR)$(PREFIX)/bin && rm -f $(BIN)
+ @cd $(DESTDIR)$(MANPREFIX)/man1 && rm -f $(MAN)
+
 dist: clean
         @echo creating dist tarball
         @mkdir -p sbase-$(VERSION)
diff -r a9db33a9bfea -r 73e26bfe699d config.mk
--- a/config.mk Sat Jun 04 14:30:54 2011 +0100
+++ b/config.mk Wed Jun 08 11:37:00 2011 +0100
@@ -1,8 +1,12 @@
 # sbase version
 VERSION = 0.0
 
+# paths
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/share/man
+
 #CC = gcc
-CC = musl-gcc
+#CC = musl-gcc
 LD = $(CC)
 CPPFLAGS = -D_POSIX_C_SOURCE=200112L
 CFLAGS = -Os -ansi -Wall -pedantic $(CPPFLAGS)
Received on Wed Jun 08 2011 - 12:37:06 CEST

This archive was generated by hypermail 2.2.0 : Wed Jun 08 2011 - 12:48:04 CEST