Add a PRECIOUS target to make sure that make does not treat archive
headers as intermediate and ends up deleting them.
Signed-off-by: Felipe Huici
---
  Makefile.uk | 12 ++++--------
  1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/Makefile.uk b/Makefile.uk
index 9251ff2..af26658 100644
--- a/Makefile.uk
+++ b/Makefile.uk
@@ -1,4 +1,4 @@
-################################################################################
+7################################################################################
  # Library registration
  
################################################################################
  $(eval $(call addlib_s,liblua,$(CONFIG_LIBLUA)))
@@ -93,6 +93,9 @@ LIBLUA_SRCS-y += $(LIBLUA_SRCS_BASE)/linit.c
  
################################################################################
  # Libray API headers
  
################################################################################
+# Make sure that make does not treat the headers from the archive as 
intermediate
+.PRECIOUS: $(LIBLUA_SRCS_BASE)/%.h
+
  $(LIBLUA_SRCS_BASE)/%.h: $(LIBLUA_BUILD)/.origin
        @# empty recipe to enforce dependency to archive extraction
  
@@ -100,13 +103,6 @@ $(LIBLUA_BUILD)/include/%.h: $(LIBLUA_SRCS_BASE)/%.h
        $(call build_cmd,LN,liblua,$@,\
        ln -sf $< $@)
  
-$(LIBLUA_SRCS_BASE)/%.hpp: $(LIBLUA_BUILD)/.origin
-       @# empty recipe to enforce dependency to archive extraction
-
-$(LIBLUA_BUILD)/include/%.hpp: $(LIBLUA_SRCS_BASE)/%.hpp
-       $(call build_cmd,LN,liblua,$@,\
-       ln -sf $< $@)
-
  # TO_INC
  UK_PREPARE += $(LIBLUA_BUILD)/include/lua.h
  UK_PREPARE += $(LIBLUA_BUILD)/include/luaconf.h