LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-18-2010, 09:56 AM   #1
luvpriya777
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
writing else if condition in makefile


I need to write an else-if condition in a makefile, and though the format is posted on several websites, nothing seem to be working, andI get an error everytime. Could anybody please write a small example with an else-if conditional in a maekefile?
 
Old 03-18-2010, 11:50 AM   #2
Zuulie
LQ Newbie
 
Registered: Mar 2010
Location: London
Distribution: Ubuntu
Posts: 16

Rep: Reputation: 1
Yes, at least one syntax was broken in make (GNU Make 3.81). The conditional ifeq (et al) seems to work OK:
Code:
TEST=NoProbbs

all : Makefile
ifeq ($(TEST),NoProbbs)
        STATUS=OK
else
        STATUS=NOTOK
endif
There are more details here:
http://theory.uwinnipeg.ca/localfile..._72.html#SEC71
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Makefile:condition to check whether a file exists ? Ashok_mittal Linux - Newbie 4 12-06-2011 08:52 PM
Writing Makefile in eclipse rupendranaidu Linux - Newbie 1 08-19-2009 07:24 PM
Need Help Writing a For Loop in a Makefile binarybob0001 Programming 3 07-31-2008 08:51 AM
need help in writing Makefile for module in 2.6 kernel videsh Linux - Software 3 01-19-2006 08:30 AM
probelm when writing a makefile ivanbbq Programming 9 03-14-2005 01:36 AM


All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration