[hackers] [slstatus] Makefile: detect running OS || Quentin Rameau

From: <git_AT_suckless.org>
Date: Mon, 30 Apr 2018 15:44:41 +0200 (CEST)

commit 92ab9ef52ebcb097add97d9f78e67ad1c1d6a6ec
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Apr 30 15:14:31 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Mon Apr 30 15:40:20 2018 +0200

    Makefile: detect running OS

diff --git a/Makefile b/Makefile
index 00c35c4..871f09d 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -2,6 +2,7 @@
 # slstatus - suckless status monitor
 .POSIX:
 
+include os.mk
 include config.mk
 
 REQ = util
diff --git a/README b/README
index 78dc7ab..b09fb77 100644
--- a/README
+++ b/README
_AT_@ -36,8 +36,9 @@ In order to build slstatus you need the Xlib header files.
 
 Installation
 ------------
-Edit config.mk to match your local setup (slstatus is installed into the
-/usr/local namespace by default). Uncomment OSSLIBS on OpenBSD.
+Run ./configure first to detect your operating system.
+Optionally edit config.mk to match your local setup (slstatus is installed into
+the /usr/local namespace by default). Uncomment OSSLIBS on OpenBSD.
 
 Afterwards enter the following command to build and install slstatus (if
 necessary as root):
diff --git a/configure b/configure
new file mode 100755
index 0000000..ee57a7f
--- /dev/null
+++ b/configure
_AT_@ -0,0 +1,3 @@
+#!/bin/sh
+
+printf 'OS = %s\n' "$(uname)" > os.mk
Received on Mon Apr 30 2018 - 15:44:41 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 30 2018 - 15:48:30 CEST