chiark / gitweb /
Prep v230: Move installed headers
[elogind.git] / Makefile.am
index 2305caff6e39d6e3d336b5f4b37126303da96793..bf9082428a387bf2799a326ff323e6e409ff3f1a 100644 (file)
@@ -58,7 +58,7 @@ PKTTYAGENT=$(bindir)/pkttyagent
 
 # Our own, non-special dirs
 pkgsysconfdir=$(sysconfdir)/elogind
-pkgincludedir=$(includedir)/elogind
+pkgincludedir=$(includedir)/elogind/systemd
 udevrulesdir=@udevrulesdir@
 udevbindir=@udevbindir@
 udevlibexecdir=$(udevbindir)
@@ -625,6 +625,18 @@ pkginclude_HEADERS += \
        src/systemd/sd-id128.h \
        src/systemd/_sd-common.h
 
+header-install-hook:
+       $(MKDIR_P) $(DESTDIR)/$(pkgincludedir)
+       cd $(DESTDIR)/$(includedir)/elogind && \
+               for hdr in $(notdir $(pkginclude_HEADERS)) ; do \
+                       $(LN_S) systemd/$$hdr $$hdr ; \
+               done
+
+header-uninstall-hook:
+       m -f $(DESTDIR)/$(includedir)/elogind/*.h
+
+INSTALL_EXEC_HOOKS += header-install-hook
+UNINSTALL_EXEC_HOOKS += header-uninstall-hook
 
 lib_LTLIBRARIES += \
        libelogind.la