summaryrefslogtreecommitdiff
path: root/lib/mesa/install-lib-links.mk
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 03:03:07 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-01-22 03:03:07 +0000
commita2addd175959cb3aeed913a723c4494a04135ca9 (patch)
tree861beaf09d2707f5950be01e90fcaa035b4afd92 /lib/mesa/install-lib-links.mk
parent7b575d15a3a74fc8e01d2df0cd88d7d432bbd6d4 (diff)
add back autotools files removed upstream
Diffstat (limited to 'lib/mesa/install-lib-links.mk')
-rw-r--r--lib/mesa/install-lib-links.mk25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/mesa/install-lib-links.mk b/lib/mesa/install-lib-links.mk
new file mode 100644
index 000000000..5fe9141d3
--- /dev/null
+++ b/lib/mesa/install-lib-links.mk
@@ -0,0 +1,25 @@
+# Provide compatibility with scripts for the old Mesa build system for
+# a while by putting a link to the driver into /lib of the build tree.
+
+if BUILD_SHARED
+if HAVE_COMPAT_SYMLINKS
+all-local : .install-mesa-links
+
+.install-mesa-links : $(lib_LTLIBRARIES)
+ $(AM_V_GEN)$(MKDIR_P) $(top_builddir)/$(LIB_DIR); \
+ for f in $(join $(addsuffix .libs/,$(dir $(lib_LTLIBRARIES))),$(notdir $(lib_LTLIBRARIES:%.la=%.$(LIB_EXT)*))); do \
+ if test -h .libs/$$f; then \
+ cp -d $$f $(top_builddir)/$(LIB_DIR); \
+ else \
+ ln -f $$f $(top_builddir)/$(LIB_DIR); \
+ fi; \
+ done && touch $@
+
+clean-local:
+ for f in $(notdir $(lib_LTLIBRARIES:%.la=.libs/%.$(LIB_EXT)*)); do \
+ $(RM) $(top_builddir)/$(LIB_DIR)/$$f; \
+ done;
+ $(RM) .install-mesa-links
+
+endif
+endif