Problem with condition in makefile...

Problem with condition in makefile...

Post by Joachim Plaettner-Hochwart » Mon, 17 May 1999 04:00:00



Hi,

I'm having problems using a condition in one of my makefiles. I wanna
define the variable COMPILER depending on the value that is hold by the
environment variable ISP. If I use

ifeq ($(ISP),irix)
COMPILER = CC
else
COMPILER = g++
endif

I get the message 'ERROR: make: file `makefile' line 8: Must be a separator (: or ::) for rules (bu39)
' for a couple lines of the makefile. Does anybody know what's wrong there?

Thanks!

Joachim

---------------------------------------------------------------------------

---------------------------------------------------------------------------

 
 
 

Problem with condition in makefile...

Post by Paul D. Smi » Mon, 17 May 1999 04:00:00



  jp> I'm having problems using a condition in one of my makefiles. I wanna
  jp> define the variable COMPILER depending on the value that is hold by the
  jp> environment variable ISP. If I use

  jp> ifeq ($(ISP),irix)
  jp> COMPILER = CC
  jp> else
  jp> COMPILER = g++
  jp> endif

  jp> I get the message 'ERROR: make: file `makefile' line 8: Must be a
  jp> separator (: or ::) for rules (bu39) ' for a couple lines of the
  jp> makefile. Does anybody know what's wrong there?

The above conditionals are GNU make features.  No other make has them.
It sounds like you're using some other make.  Type "make --version" and
make sure you're using GNU make.  If not, you can download and build GNU
make from ftp://ftp.gnu.org/gnu/make/

--
-------------------------------------------------------------------------------

 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.

 
 
 

1. How to add ifdef condition in Makefile

 Hi,
    can anybody tell me how to use  ifdef construct in Makefile on aix.

I tried with the following
.ifdef VAR
  VAR1 = foo
.endif
   It fails with the error Make : 1254-055 Dependency line needs colon or
double colon operator.

- Sharad

2. Interactive SLIP

3. make: conditions in the Makefile

4. KDE3 strange kicker and menus missing items

5. If (condition) in makefile

6. need help with 3com 3c509b

7. Conditions in makefile

8. can't turn swap on

9. supraexpress modems (28.8) problems w/dial-ins

10. Netscape plug-ins problem

11. Problems with dialing out when dial-ins are enabled

12. Netscape 4.51 and plug-ins problem

13. diff -rcN ups-2.45.2/Makefile ups/Makefile