Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-18-2010, 09:56 AM   #1
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
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:

all : Makefile
ifeq ($(TEST),NoProbbs)
There are more details here:


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:53 PM.

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