From cfd322bd3d1775da08b1a42ffa7816bcd20092a8 Mon Sep 17 00:00:00 2001 From: Kevin Rosenberg Date: Tue, 2 Dec 2003 03:12:05 +0000 Subject: [PATCH] Add fink operating system detection --- doc/Makefile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index dcdf6a7..41a4320 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -6,23 +6,29 @@ DOCFILE_EXT_DEFAULT:=xml # Standard docfile processing as copied from UFFI # Placed into public domain by author Kevin Rosenberg -DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*') -SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*') -REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*') - - -ifneq (${DEBIAN},0) -OS:=debian -else - ifneq (${SUSE},0) - OS=suse - else - ifneq (${REDHAT},0) - OS=redhat +SYSTEM:=$(shell uname) + +ifeq ($(SYSTEM),Linux) + DEBIAN=$() + SUSE= + REDHAT= + + ifneq ($(shell expr "`cat /etc/issue`" : '.*Debian.*'),0) + OS:=debian + else + ifneq ($(shell expr "`cat /etc/issue`" : '.*SuSE.*'),0) + OS=suse + else + ifneq ($(shell expr "`cat /etc/issue`" : '.*RedHat.*'),0) + OS=redhat + endif endif endif endif +ifeq ($(SYSTEM),Darwin) + OS:=fink +endif ifndef DOCFILE_BASE DOCFILE_BASE=${DOCFILE_BASE_DEFAULT} -- 1.7.10.4