Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3401080
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:58:18+00:00 2026-05-18T04:58:18+00:00

can anybody tell me if there is a way to insert a conditional block

  • 0

can anybody tell me if there is a way to insert a conditional block to Makefile.am so that it will be passed further to a Makfile created by autotools?

Here is an example:

ifeq "$(SOMEVAR)" ""
SOMEVAR="default_value"
endif

This seems to be a usual Makefile way of doing conditional things. Automake cuts endif line off and make fails eventually with a message like this:

Makefile:390: * missing `endif’. Stop.

any thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:58:18+00:00Added an answer on May 18, 2026 at 4:58 am

    Since it’s tagged as Autoconf also, I suggest putting the condition in configure.ac, if that is possible. Similar to so:

    AM_CONDITIONAL([CONDITION_NAME], [test x"${SOMEVAR}" != x])
    

    Then, your Makefile.am would contain

    if CONDITION_NAME
    <conditional code>
    else
    <else :)>
    endif
    

    Update

    The problem has to do with

    python setup.py --root=$(DESTDIR) --prefix=$(DESTDIR)$(prefix)
    

    being called from somewhere. If DESTDIR is empty, the prefix may expand to a relative path, which is not what you want. You have confirmed it is being called from your Makefile.am. Then there’s two things you can do.

    1. Change the above command to python setup.py --root=${DESTDIR}/// --prefix=${DESTDIR}///$(prefix). Triple slashes may be necessary since, AFAIK, POSIX allows for double slashes to have a special meaning, but not for three or more consecutive slashes.

    2. Change the above command to DESTDIR=${DESTDIR:-///} && python setup.py --root=${DESTDIR} --prefix=${DESTDIR}$(prefix)

    It may be noteworthy that, in my opinion and limited understanding of the whole picture, none of that should be necessary. Since the original caller of configure was able to specify exactly which prefix he really wanted to use. If none is specified, Autoconf already defaults to an absolute path (/usr/local). So, I guess, I don’t quite understand why you run into your problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody tell me if there is a way for me to get the
Can anybody tell me if there is a way to position the edit-form Popup
There is a term named API communication all over around. Can anybody tell me
Can anybody tell if there are any tools other than CLANG static analyzer and
Can anybody tell about three things: How to retrieve TimeZone from java.util.Date instance? How
Can anybody tell me how to parse and edit HTML in PHP?
Can anybody tell me how to search for available iPhone/iPod devices on a network
can anybody tell me what's the point if any for a javascript function like
can anybody tell me why this works <g:each var=n in=${com.pp.News.list()}> <h2>${n.t}</h2> <p>${n.tx}</p> </g:each> but
Can anybody tell me about Generation of Garbage Collector in .net ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.