From 314bf4a1f436586b38df09f4b87cdfbe6e7add37 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 27 Jun 2000 20:54:06 +0000 Subject: [PATCH] fix typo in w32-vcc.mk allow direct setting of X11_PATH for unusual X11 paths. --- config/win32/w32-vcc.mk | 2 +- demos/graph/x11/rules.mk | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/config/win32/w32-vcc.mk b/config/win32/w32-vcc.mk index da1ef487e..4f0a4a3db 100644 --- a/config/win32/w32-vcc.mk +++ b/config/win32/w32-vcc.mk @@ -1,5 +1,5 @@ # -# FreeType 2 Configuration rules for Win32 + LCC +# FreeType 2 Configuration rules for Win32 + Visual C/C++ # diff --git a/demos/graph/x11/rules.mk b/demos/graph/x11/rules.mk index a1641fd17..e1dc2b3e8 100644 --- a/demos/graph/x11/rules.mk +++ b/demos/graph/x11/rules.mk @@ -9,25 +9,37 @@ # # Try to detect an X11 setup. # -# We simply try to detect a `X11R6/bin', `X11R5/bin' or `X11/bin' in -# the current path. +# We try to detect the following directories (in that order) in the current +# path: # -ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),) - xversion := X11R6 -else - ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),) - xversion := X11R5 +# X11 (usually a symlink to the current release) +# X11R6 +# X11R5 +# +# If the variable X11_PATH is set (to specify unusual locations of X11), no +# other directory is searched. More than one directory must be separated +# with spaces. Example: +# +# make X11_PATH="/usr/openwin /usr/local/X11R6" +# +ifndef X11_PATH + ifneq ($(findstring X11$(SEP)bin,$(PATH)),) + xversion := X11 else - ifneq ($(findstring X11$(SEP)bin,$(PATH)),) - xversion := X11 + ifneq ($(findstring X11R6$(SEP)bin,$(PATH)),) + xversion := X11R6 + else + ifneq ($(findstring X11R5$(SEP)bin,$(PATH)),) + xversion := X11R5 + endif endif endif -endif -ifdef xversion - X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH)) - X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH)) - X11_PATH := $(X11_PATH:%$(SEP)bin=%) + ifdef xversion + X11_PATH := $(subst ;, ,$(PATH)) $(subst :, ,$(PATH)) + X11_PATH := $(filter %$(xversion)$(SEP)bin,$(X11_PATH)) + X11_PATH := $(X11_PATH:%$(SEP)bin=%) + endif endif ##########################################################################