bug-make
[Top][All Lists]
Advanced

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

[bug #9062] Need access to pathname of Makefile


From: Nikolay Molchanov
Subject: [bug #9062] Need access to pathname of Makefile
Date: Sun, 2 Apr 2006 01:24:48 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Follow-up Comment #6, bug #9062 (project make):

I tried to use ${CURDIR} and ${MAKEFILE_LIST} with a GNU make 
on Solaris, but these variables are empty. In what version of 
GNU make they appear? I think they work in 1.80, correct?
Here is what I tried:

% uname -a
SunOS volga2 5.9 Generic_112233-07 sun4u sparc SUNW,Ultra-60
% gmake -version
GNU Make version 3.74-96q4, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation,
Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS 
FOR A PARTICULAR PURPOSE.

% cat Makefile
d=${CURDIR}
m=${MAKEFILE_LIST}

all:
        echo "Directory = $d"
        echo "CURDIR=${CURDIR}"
        echo "Makefile = $m"
        echo "MAKEFILE_LIST=${MAKEFILE_LIST}"

% gmake
echo "Directory = "
Directory =
echo "CURDIR="
CURDIR=
echo "Makefile = "
Makefile =
echo "MAKEFILE_LIST="
MAKEFILE_LIST=


There is a standard env. variable ${PWD}, which contains the path
to the current directory. It is supported by Solaris make, GNU 
make, and some other make utilities.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9062>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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