]> git.proxmox.com Git - mirror_corosync.git/commitdiff
srcdir is not set when realpath & abspath don't work
authorSteven Dake <sdake@redhat.com>
Mon, 10 Dec 2007 21:20:01 +0000 (21:20 +0000)
committerSteven Dake <sdake@redhat.com>
Mon, 10 Dec 2007 21:20:01 +0000 (21:20 +0000)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1492 fd59a12c-fef9-0310-b244-a6a79926bd2f

Makefile

index 4756c64a2bf49df002d3391a37372aa8ba813d99..8abb46e7f55caa43a84eb40b7a4505d6633ad736 100644 (file)
--- a/Makefile
+++ b/Makefile
 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 # THE POSSIBILITY OF SUCH DAMAGE.
 
-builddir:=$(shell pwd)/
+builddir:=$(CURDIR)/
 ifneq ($(O),)
 # cleanup the path (make it absolute)
 builddir:=$(abspath $(O))/
+ifeq ($(builddir),)
+builddir:=$(O)
+$(warning your abspath function is not working)
+$(warning > setting builddir to $(builddir))
+endif
+endif
+
+THIS_MAKEFILE:=$(realpath $(lastword $(MAKEFILE_LIST)))
+
+ifeq ($(THIS_MAKEFILE),)
+srcdir:=$(CURDIR)/
+$(warning your realpath function is not working)
+$(warning > setting srcdir to $(srcdir))
+else
+srcdir:=$(dir $(THIS_MAKEFILE))
 endif
-srcdir:=$(dir $(realpath $(MAKEFILE_LIST)))
 
-include $(srcdir)/Makefile.inc
+include $(srcdir)Makefile.inc
 
 SBINDIR=$(PREFIX)/sbin
 INCLUDEDIR=$(PREFIX)/include/openais