summaryrefslogtreecommitdiff
path: root/pkgtools/xpkgwedge/files/xpkgwedge.def
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools/xpkgwedge/files/xpkgwedge.def')
-rw-r--r--pkgtools/xpkgwedge/files/xpkgwedge.def33
1 files changed, 33 insertions, 0 deletions
diff --git a/pkgtools/xpkgwedge/files/xpkgwedge.def b/pkgtools/xpkgwedge/files/xpkgwedge.def
new file mode 100644
index 00000000000..879fcdb3e93
--- /dev/null
+++ b/pkgtools/xpkgwedge/files/xpkgwedge.def
@@ -0,0 +1,33 @@
+/* $NetBSD: xpkgwedge.def,v 1.1 1998/06/26 16:39:25 tv Exp $ */
+
+#ifdef AfterVendorCF
+
+/*
+ * The following defines inject a "PREFIX=" make-time option that lets the
+ * user twiddle the ProjectRoot setting with a single switch. This makes
+ * the command "make PREFIX=/path/to/install all install" work as expected.
+ *
+ * Note that ?= is a special Pmake construct and probably will not work on
+ * other makes.
+ */
+
+#ifndef ProjectRoot
+/*
+ * Assume the worst: this should not happen in practice, as this setup
+ * does not work with the classical /usr/{include,lib}/X11 layout.
+ */
+#define ProjectRoot /usr/X11
+#endif
+
+PREFIX ?= ProjectRoot
+X11_ROOT = ProjectRoot
+#undef ProjectRoot
+#define ProjectRoot $(PREFIX)
+
+/*
+ * This emits dual -I and -L options to cc automatically, one for the actual
+ * X11 root, and one for the user-set prefix.
+ */
+#define X11ProjectRoot $(X11_ROOT)
+
+#endif