BR2_HAVE_DOCUMENTATION: add option to remove documentation from target
authorPeter Korsgaard <jacmet@sunsite.dk>
Mon, 20 Oct 2008 11:32:25 +0000 (11:32 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 20 Oct 2008 11:32:25 +0000 (11:32 -0000)
Some packages' install-strip target install quite big documentation,
so create an option to remove it similar to the existing man/info options.

Config.in
package/Makefile.autotools.in

index 32a154bc3074e5df35023af29e5cc364b2ec832a..ddbe43b9ac81ed2f3ab4f0c7601bf044d75cbb3f 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -348,6 +348,13 @@ config BR2_HAVE_INFOPAGES
          If you say n here, your target will not contain any
          infopage.
 
+config BR2_HAVE_DOCUMENTATION
+       bool "documentation on the target"
+       help
+         Leave the documentation on the target.
+         If you say n here, your target will not contain any
+         documentation.
+
 config BR2_HAVE_DEVFILES
        bool "development files in target filesystem"
        help
index 0925feb06b0bf9662ee46cf6e9107c0b74edbd41..9f7a54807ae5dda42e778a19a2ed543a4cf0907c 100644 (file)
@@ -256,6 +256,9 @@ $(PROJECT_BUILD_DIR)/autotools-stamps/%_target_installed:
        $(if $(BR2_HAVE_INFOPAGES),,for d in info share/info; do \
                rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
        done)
+       $(if $(BR2_HAVE_DOCUMENTATION),,for d in doc share/doc; do \
+               rm -rf $(TARGET_DIR)/$$d $(TARGET_DIR)/usr/$$d; \
+       done)
        $(Q)mkdir -p $(@D)
        touch $@