diff options
author | Jean Delvare <jdelvare@suse.de> | 2010-10-11 14:08:16 +0000 |
---|---|---|
committer | Jean Delvare <jdelvare@suse.de> | 2010-10-11 14:08:16 +0000 |
commit | 1e4fc691b1c8b9a674144cc91bd6e7231d0a4e1a (patch) | |
tree | 4865934e1db75b82772697b623b8cdb5a1483fe0 /Makefile | |
parent | 4d359dc9fc1333e045472ed1c64c7c1966c90864 (diff) | |
download | dmidecode-git-1e4fc691b1c8b9a674144cc91bd6e7231d0a4e1a.tar.gz |
Rework BSD make compatibility trick. The previous trick would break
GNU make 3.82.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -38,12 +38,18 @@ INSTALL_DIR := $(INSTALL) -m 755 -d INSTALL_PROGRAM := $(INSTALL) -m 755 RM := rm -f -PROGRAMS := dmidecode -PROGRAMS += $(shell test `uname -m 2>/dev/null` != ia64 && echo biosdecode ownership vpddecode) -# BSD make doesn't understand the $(shell) syntax above, it wants the != -# syntax below. GNU make ignores the line below so in the end both BSD -# make and GNU make are happy. -PROGRAMS != echo dmidecode ; test `uname -m 2>/dev/null` != ia64 && echo biosdecode ownership vpddecode +# BSD make provides $MACHINE, but GNU make doesn't +MACHINE ?= $(shell uname -m 2>/dev/null) + +# These programs are only useful on x86 +PROGRAMS-i386 := biosdecode ownership vpddecode +PROGRAMS-i486 := $(PROGRAMS-i386) +PROGRAMS-i586 := $(PROGRAMS-i386) +PROGRAMS-i686 := $(PROGRAMS-i386) +PROGRAMS-x86_64 := biosdecode ownership vpddecode +PROGRAMS-amd64 := $(PROGRAMS-x86_64) + +PROGRAMS := dmidecode $(PROGRAMS-$(MACHINE)) all : $(PROGRAMS) |