about summary refs log tree commit diff
path: root/common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/common.mk b/common.mk
index f93c9e0f..5ac872fd 100644
--- a/common.mk
+++ b/common.mk
@@ -109,12 +109,24 @@ LDLIBS = $(LOADLIBES) $(LIBS)
 # disastrous if PKGDIR is a relative directory, and I don't know any
 # way to detect that case and fail, so I just add a '/' to the front
 # if it isn't already there.
+#
+# TODO: Convert 'pkgdir' to absolute path with # the $(abspath ...)
+# built-in function, available from GNU Make v 3.81 onward. 
 ifneq ($(pkgdir)x,x)
-  PKGDIR = $(patsubst //%, /%, /$(pkgdir))
+  PKGDIR = $(patsubst //%,/%, /$(pkgdir))
 else
   PKGDIR = $(PKGDIR_DEFAULT)
 endif
 
+
+# 'resultdir', like 'pkgdir' is meant to be supplied from the make
+# command line.  Unlike 'pkgdir' we allow relative paths.
+ifneq ($(resultdir)x,x)
+  RESULTDIR = $(resultdir)
+else
+  RESULTDIR = $(RESULTDIR_DEFAULT)
+endif
+
 #===========================================================================
 # We build a directory full of symbolic links to the intra-Netpbm public
 # header files just so the compile commands don't have to be littered