ref: 7f832c62c90bc9660709b4a7171c28a418abfd03
parent: cac66e2141e706818050206cb6d20f246209cf1a
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Aug 19 08:08:45 EDT 2018
Fix system configuration Add a shell script with a default case. This new version allows to execute the script with unknown systems.
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@
rm -f config
config:
- (echo '/^# '`uname`'/+;/^###$$/- s/^#//'; echo w) | ed -s config.mk
+ ./configure.sh
touch $@
install: all
--- a/config.mk
+++ b/config.mk
@@ -22,18 +22,7 @@
#SYSCFLAGS = -D_SUSV2_SOURCE
#STDCFLAGS =
###
-# NetBSD
-#SYSCFLAGS =
-#STDCFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE
-###
-# OpenBSD
-#SYSCFLAGS =
-#STDCFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE
-###
-# FreeBSD
-#SYSCFLAGS =
-#STDCFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE
-# Linux
+# BSD
#SYSCFLAGS =
#STDCFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE
###
--- /dev/null
+++ b/configure.sh
@@ -1,0 +1,16 @@
+#!/bin/sh
+
+case `uname` in
+*BSD)
+ sys=BSD
+ ;;
+*Plan9)
+ sys=Plan9
+ ;;
+*)
+ exit
+ ;;
+esac
+
+
+(echo '/^# '$sys'/+;/^###$/- s/^#//'; echo w) | ed -s config.mk