linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] headers_install: avoid those .install & ..install.cmd unused files
@ 2011-12-03  9:24 Cheng Renquan
  2011-12-10 14:43 ` Michal Marek
  0 siblings, 1 reply; 2+ messages in thread
From: Cheng Renquan @ 2011-12-03  9:24 UTC (permalink / raw)
  To: linux-kbuild, Michal Marek; +Cc: Sam Ravnborg

The modules_install, firmware_install, all install commands
don't generate such hidden unused files under destination;
I think headers_install also should not to generate such .install
& ..install.cmd files;
Usually, we call "make headers_install INSTALL_HDR_PATH=/some/path"
expecting it install just the header files, not those dot files;

The original "call if_changed" could generate ..install.cmd and
together with "touch .install" could make the 2nd time headers_install
quite faster but it's not meaningful here, because we usually only install once;


diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index a57f5bd..b3deff2 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -54,8 +54,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words
$(all-files))\
         $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
         for F in $(wrapper-files); do                                   \
                 echo "\#include <asm-generic/$$F>" > $(install)/$$F;    \
-        done;                                                           \
-        touch $@
+        done

 quiet_cmd_remove = REMOVE  $(unwanted)
       cmd_remove = rm -f $(unwanted-file)
@@ -66,8 +65,7 @@ quiet_cmd_check = CHECK   $(printdir) ($(words
$(all-files)) files)
       cmd_check = for f in $(all-files); do                          \
                   echo "$(install)/$${f}"; done                      \
                   | xargs                                            \
-                  $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH); \
-	          touch $@
+                  $(PERL) $< $(INSTALL_HDR_PATH)/include $(SRCARCH)

 PHONY += __headersinst __headerscheck

@@ -80,7 +78,7 @@ targets += $(install-file)
 $(install-file): scripts/headers_install.pl $(input-files) FORCE
 	$(if $(unwanted),$(call cmd,remove),)
 	$(if $(wildcard $(dir $@)),,$(shell mkdir -p $(dir $@)))
-	$(call if_changed,install)
+	$(call cmd,install)

 else
 __headerscheck: $(subdirs) $(check-file)
@@ -88,7 +86,7 @@ __headerscheck: $(subdirs) $(check-file)

 targets += $(check-file)
 $(check-file): scripts/headers_check.pl $(output-files) FORCE
-	$(call if_changed,check)
+	$(call cmd,check)

 endif


-- 
Cheng Renquan (程任全)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] headers_install: avoid those .install & ..install.cmd unused files
  2011-12-03  9:24 [PATCH] headers_install: avoid those .install & ..install.cmd unused files Cheng Renquan
@ 2011-12-10 14:43 ` Michal Marek
  0 siblings, 0 replies; 2+ messages in thread
From: Michal Marek @ 2011-12-10 14:43 UTC (permalink / raw)
  To: Cheng Renquan; +Cc: linux-kbuild, Sam Ravnborg

On 3.12.2011 10:24, Cheng Renquan wrote:
> The modules_install, firmware_install, all install commands
> don't generate such hidden unused files under destination;
> I think headers_install also should not to generate such .install
> & ..install.cmd files;
> Usually, we call "make headers_install INSTALL_HDR_PATH=/some/path"
> expecting it install just the header files, not those dot files;
> 
> The original "call if_changed" could generate ..install.cmd and
> together with "touch .install" could make the 2nd time headers_install
> quite faster but it's not meaningful here, because we usually only install once;

I think it makes sense for any *_install target to run the whole install
sequence. The slight problem is that headers_check has an explicit
dependency on headers_install, so someone doing
   make headers_install && make headers_check
might not like the change.


> diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
> index a57f5bd..b3deff2 100644
> --- a/scripts/Makefile.headersinst
> +++ b/scripts/Makefile.headersinst
> @@ -54,8 +54,7 @@ quiet_cmd_install = INSTALL $(printdir) ($(words
> $(all-files))\
>          $(PERL) $< $(objtree)/$(obj) $(install) $(SRCARCH) $(objhdr-y); \
>          for F in $(wrapper-files); do                                   \
>                  echo "\#include <asm-generic/$$F>" > $(install)/$$F;    \
> -        done;                                                           \
> -        touch $@
> +        done

If you are removing the .install marker, then please also remove any
reference to it from the makefile.

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-10 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-03  9:24 [PATCH] headers_install: avoid those .install & ..install.cmd unused files Cheng Renquan
2011-12-10 14:43 ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).