Makefile: detect running OS
authorQuentin Rameau <quinq@fifth.space>
Mon, 30 Apr 2018 13:14:31 +0000 (15:14 +0200)
committerAaron Marcher <me@drkhsh.at>
Mon, 30 Apr 2018 13:40:20 +0000 (15:40 +0200)
Makefile
README
configure [new file with mode: 0755]

index 00c35c4d61bb1ebcfa591d81b2aac1c2ce8868e9..871f09d263e4a8886001937d65372bec4b63b23f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@
 # slstatus - suckless status monitor
 .POSIX:
 
+include os.mk
 include config.mk
 
 REQ = util
diff --git a/README b/README
index 78dc7ab1ba3a531ae4915a92b4205baa7c93c16f..b09fb7724a62e271ce0dbb0b8efc9eb88284f494 100644 (file)
--- a/README
+++ b/README
@@ -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 (executable)
index 0000000..ee57a7f
--- /dev/null
+++ b/configure
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+printf 'OS = %s\n' "$(uname)" > os.mk