pud: install extra (documention) files
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 17 May 2019 16:56:07 +0000 (18:56 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 17 Jun 2019 21:04:50 +0000 (23:04 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/Makefile

index 21ffc7b..e252442 100644 (file)
@@ -128,8 +128,18 @@ install: all
        mkdir -p "$(ETCDIR)"
        cp "$(RESOURCESDIR)/olsrd.pud.position.conf" "$(ETCDIR)"
        $(STRIP) "$(LIBDIR)/$(PLUGIN_FULLNAME)"
+ifneq ($(DOCDIR_OLSRD),)
+       mkdir -p "$(DOCDIR_OLSRD)"
+       cp -t "$(DOCDIR_OLSRD)" "README_PUD" "nmealib/README_NMEALIB" \
+         "wireformat-java/README_PUD_WIREFORMAT_JAVA" "doc/pud.odt"
+endif
 
 uninstall:
+ifneq ($(DOCDIR_OLSRD),)
+       rm -f "$(DOCDIR_OLSRD)/README_PUD" "$(DOCDIR_OLSRD)/README_NMEALIB" \
+         "$(DOCDIR_OLSRD)/README_PUD_WIREFORMAT_JAVA" "$(DOCDIR_OLSRD)/pud.odt"
+       rmdir -p --ignore-fail-on-non-empty "$(DOCDIR_OLSRD)"
+endif
        $(MAKECMDPREFIX)$(MAKE) -C "$(NMEALIB_PATH)" DESTDIR="$(DESTDIR)" uninstall
        $(MAKECMDPREFIX)$(MAKE) -C "$(LIBRARY_PATH)" DESTDIR="$(DESTDIR)" uninstall
        rm -f "$(LIBDIR)/lib$(PLUGIN_NAME).so" "$(LIBDIR)/$(PLUGIN_NAME)" "$(ETCDIR)/olsrd.pud.position.conf"