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 [root@c94 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;${USER}@${HOSTNAME}: ${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 [root@c94 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 [root@c94 texmpeg]# make Makefile:13: makedefs.: No such file or directory make: *** No rule to make target `makedefs.'. Stop. There are no whitespace characters, see [root@c94 texmpeg]# echo A"$OSTYPE"A Alinux-gnuA but as soon as I reset the variable with [root@c94 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: [EMAIL PROTECTED] H O Homepage: http://www.lysator.liu.se/~gz E \------------------------------F-U-T-U-R-E-------------------------------/
#-------------------------------------------------------------------# #-- OS dependent includes for the Desert Storm project --# #-------------------------------------------------------------------# #This is the position of the internal source for the mpeg2 decoder library (needed for video_vtex) MPEG2=/usr/src/mpeg2dec MPLAYER=/usr/src/mplayer # Linux Compiler COMP=g++ CC=gcc # Linux libs LIBS = $(MPEG2)/src/cpu_accel.o -lpfdu -lpfutil -lpf -lpfui -lGLU -lGL -lmpeg2 -lvo -lXext -lXv -lSDL -lXmu\ -lX11 -lm -lrplay -lpthread -lao2 -lac3 -lMP3 -lasound -lpng #-MD CFLAGS=-O3 -fomit-frame-pointer -ffast-math -march=pentiumpro -DI386 -DLinux -I$(MPEG2)/include -Wall -Wno-deprecated VTEX_CFLAGS=$(CFLAGS) -DHAVE_CONFIG_H -I$(MPEG2)/include -I$(MPEG2)/libmpeg2 -I. -I$(MPLAYER) -I$(MPEG2)/libvo LFLAGS=-L/usr/lib -L/usr/lib/libpfdb -L/lib -L$(MPLAYER)/libao2 -L$(MPLAYER)/libac3 -L$(MPLAYER)/mp3lib -L/usr/X11R6/lib #-L$(MPEG2)/libmpeg2/.libs -L$(MPEG2)/libvo/.libs -\
#-------------------------------------------------------------------# #-- Makefile for the Desert Storm project --# #-------------------------------------------------------------------# # include machine dependent files #ifeq ($(strip $(OSTYPE)),linux-gnu) # include makedefs.linux #endif #ifeq ($(OSTYPE),irix6.5) # include makedefs.irix #endif include makedefs.$(ostype) all: desert echo $(OSTYPE) # ----- Building rules ----- desert: desert.o QuakeXformer.o video_out_vtex.o texmpeg2.o demuxer.o demux_mpg.o dvdauth.o stream.o dec_audio.o codec-cfg.o $(COMP) $(LFLAGS) desert.o QuakeXformer.o video_out_vtex.o texmpeg2.o demuxer.o demux_mpg.o dvdauth.o stream.o dec_audio.o codec-cfg.o $(LIBS) -o desert desert.o: desert.cc init.cc input.cc $(COMP) $(CFLAGS) -c desert.cc texmpeg2.o: texmpeg2.cc whirl_mpeg.cc parse_es.c mpegz.cc $(COMP) $(VTEX_CFLAGS) -c texmpeg2.cc QuakeXformer.o: QuakeXformer.cc $(COMP) $(CFLAGS) -c QuakeXformer.cc sound_thread.o: sound_thread.cc sound_thread.h $(COMP) $(CFLAGS) -c sound_thread.cc video_out_vtex.o: video_out_vtex.c video_out_vtex.h $(CC) $(VTEX_CFLAGS) -c video_out_vtex.c demuxer.o: demuxer.c $(CC) $(CFLAGS) -c demuxer.c demux_mpg.o: demux_mpg.c $(CC) $(CFLAGS) -c demux_mpg.c dec_audio.o: dec_audio.c $(CC) $(VTEX_CFLAGS) -c dec_audio.c dvdauth.o: dvdauth.c $(CC) $(CFLAGS) -c dvdauth.c stream.o: stream.c $(CC) $(CFLAGS) -c stream.c codec-cfg.o: codec-cfg.c $(CC) $(VTEX_CFLAGS) -c codec-cfg.c clean: rm *.o; rm *.d