[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Makefile problems together with OSTYPE env variable
From: |
Gernot Ziegler |
Subject: |
Makefile problems together with OSTYPE env variable |
Date: |
Mon, 2 Sep 2002 15:16:01 +0200 (MEST) |
Hej guys !
Sorry to disturb, but I can't seem to find the fix for this one:
I am using Mandrake 9.0 beta 2 (with the make RPM make-3.79.1-10mdk) and
address@hidden root]# bash --version
bash --version
GNU bash, version 2.05a.0(1)-release (i586-mandrake-linux-gnu)
Copyright 2001 Free Software Foundation, Inc.
echo -ne "\033]0;address@hidden: ${PWD}\007"
Now my problem is rather ... simple:
I wish to use $(OSTYPE) in my Makefile, and the code I am using is
ifeq ($(strip $(OSTYPE)),linux-gnu)
include makedefs.linux
endif
ifeq ($(OSTYPE),irix6.5)
include makedefs.irix
endif
Bash reports
address@hidden root]# set | grep OSTYPE
OSTYPE=linux-gnu
The funny thing is that a simple "make" on my Linux machine (Not on the
IRIX, it works there with GNU make) doesn't find this OSTYPE env variable,
it reports it to be empty (e.g.
echo abc $(OSTYPE) abc
is empty, returns
abc abc).
Another version of the above code, the classic
include makedefs.$(OSTYPE)
reports
address@hidden texmpeg]# make
Makefile:13: makedefs.: No such file or directory
make: *** No rule to make target `makedefs.'. Stop.
There are no whitespace characters, see
address@hidden texmpeg]# echo A"$OSTYPE"A
Alinux-gnuA
but as soon as I reset the variable with
address@hidden texmpeg]# export OSTYPE=linux-gnu
it works !!
That's a real weirdie, isn't it ? ;)
Servus,
Gernot
/-----------------------------W-E-L-C-O-M-E------------------------------\
T The Austria <=> Sweden connection..... T
| E-Mail: address@hidden H
O Homepage: http://www.lysator.liu.se/~gz E
\------------------------------F-U-T-U-R-E-------------------------------/
makedefs.linux
Description: Text document
Makefile
Description: Text document
- Makefile problems together with OSTYPE env variable,
Gernot Ziegler <=