diff --git a/Makefile.am b/Makefile.am index 2cda0ea..47d2a4e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -22,13 +22,6 @@ noinst_HEADERS = noinst_LTLIBRARIES = dist_doc_DATA = dist_man_MANS = -INSTALL_HEADER = \ - install_patch_header () {\ - ${INSTALL_DATA} $$1 $$2; \ - file=`echo "$$1" | sed -e 's|^.*/||'`; \ - sed -i -e 's/^EXPORT/extern/' $$2/$$file; \ - }; \ - install_patch_header include doc/Makemodule.am include examples/Makemodule.am diff --git a/include/Makemodule.am b/include/Makemodule.am index 37364d3..e4c5df8 100644 --- a/include/Makemodule.am +++ b/include/Makemodule.am @@ -1,10 +1,22 @@ -pkginclude_HEADERS += \ - include/libacl.h - -sysinclude_HEADERS += \ - include/acl.h - noinst_HEADERS += \ + include/libacl.h \ + include/acl.h \ include/acl_ea.h \ include/misc.h \ include/walk_tree.h + +SUBST_INSTALL_HEADER = \ + subst_install_header() { \ + file=`echo "$$1" | sed -e 's,^.*/,,'`; \ + $(SED) -e "s/\/extern/" < "$$1" > "include/$$file.t" || exit 1; \ + $(MKDIR_P) "$$2" || exit 1; \ + $(INSTALL_HEADER) "include/$$file.t" "$$2/$$file" || exit 1; \ + $(RM) "include/$$file.t"; \ + }; \ + subst_install_header + +install-libacl_h: include/libacl.h + $(SUBST_INSTALL_HEADER) "$<" "$(DESTDIR)$(pkgincludedir)" +install-acl_h: include/acl.h + $(SUBST_INSTALL_HEADER) "$<" "$(DESTDIR)$(sysincludedir)" +install-data-local: install-libacl_h install-acl_h