Fix #18: optional compat symlink lite -> libite/

Default is to create the symlink, to facilitate upgrades.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-11-28 19:22:45 +01:00
parent 407b8f6dbf
commit 1c0988b8e2
2 changed files with 23 additions and 2 deletions
+15
View File
@@ -28,3 +28,18 @@ pkginclude_HEADERS = lite.h queue.h conio.h tree.h strlite.h strdupa.h \
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libite.pc
## For compatibility with existing installations that look for lite/lite.h
if COMPAT_SYMLINK
install-data-hook:
link=$(DESTDIR)$(includedir)/lite; \
if [ ! -f $$link ]; then \
$(LN_S) libite $$link; \
fi
uninstall-hook:
link=$(shell readlink $(DESTDIR)$(includedir)/lite); \
if [ "$$link" = "libite" ]; then \
$(RM) $(DESTDIR)$(includedir)/lite; \
fi
endif