[Olsr-dev] [PATCH v1 2/5] PUD: do not install headers by default

Ferry Huberts (spam-protected)
Thu May 10 16:09:58 CEST 2012


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/pud/wireformat/Makefile |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/pud/wireformat/Makefile b/lib/pud/wireformat/Makefile
index 6f39055..619ef7c 100644
--- a/lib/pud/wireformat/Makefile
+++ b/lib/pud/wireformat/Makefile
@@ -51,7 +51,7 @@ default_target install clean:
 
 else
 
-.PHONY: all default_target prepare clean doc doc-clean install uninstall
+.PHONY: all default_target prepare clean doc doc-clean install install-headers uninstall uninstall-headers
 
 #
 # Targets
@@ -94,20 +94,26 @@ doc-clean:
 	@$(MAKE) -C doc clean
 
 install: all
-	rm -fr "$(DESTDIR)/$(INC_DIR_INSTALL)"
-	mkdir -v -p "$(DESTDIR)/$(LIBDIR_INSTALL)" "$(DESTDIR)/$(INC_DIR_INSTALL)"
+	mkdir -v -p "$(DESTDIR)/$(LIBDIR_INSTALL)"
 	cp "$(LIBDIR_BUILD)/$(SONAME)" "$(DESTDIR)/$(LIBDIR_INSTALL)/$(SONAME).$(PLUGIN_VER)"
 	$(STRIP) "$(DESTDIR)/$(LIBDIR_INSTALL)/$(SONAME).$(PLUGIN_VER)"
 	ldconfig -n "$(DESTDIR)/$(LIBDIR_INSTALL)"
+
+install-headers:
+	rm -fr "$(DESTDIR)/$(INC_DIR_INSTALL)"
+	mkdir -v -p "$(DESTDIR)/$(INC_DIR_INSTALL)"
 	cp -t "$(DESTDIR)/$(INC_DIR_INSTALL)" $(INC_DIR_C)/*.h
 
 uninstall:
-	rm -fr "$(DESTDIR)/$(INC_DIR_INSTALL)/"*.h
 	rm -f "$(DESTDIR)/$(LIBDIR_INSTALL)/$(SONAME)" \
 	      "$(DESTDIR)/$(LIBDIR_INSTALL)/$(SONAME).$(PLUGIN_VER)"
 	ldconfig -n "$(DESTDIR)/$(LIBDIR_INSTALL)"
 	rmdir -v -p --ignore-fail-on-non-empty \
-	  "$(DESTDIR)/$(LIBDIR_INSTALL)" \
+	  "$(DESTDIR)/$(LIBDIR_INSTALL)"
+
+uninstall-headers:
+	rm -fr "$(DESTDIR)/$(INC_DIR_INSTALL)/"*.h
+	rmdir -v -p --ignore-fail-on-non-empty \
 	  "$(DESTDIR)/$(INC_DIR_INSTALL)"
 
 endif
-- 
1.7.7.6





More information about the Olsr-dev mailing list