help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Evaluate scripts/commands output before assignment + include directi


From: Paul D. Smith
Subject: Re: Evaluate scripts/commands output before assignment + include directive
Date: Mon, 18 Nov 2002 23:29:22 -0500

%% Kanna Potharlanka <address@hidden> writes:

  kp> I am trying to do the following in my Makefile.

  kp> BUILD_DIR = `current_tag`
  kp> include $BUILD_DIR/Makefile.inc

I'm assuming your makefile actually says "include $(BUILD_DIR)/Makefile.inc"

This won't work: make does not expand backquotes.  Backquotes are a
shell feature, not a make feature.

If you're using GNU make you can use the $(shell ...) function:

  BUILD_DIR := $(shell current_tag)

This is not portable to other versions of make of course.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]