Re: Incremental make broken?

Bengt Martensson <[email protected]>
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
On 08/31/17 12:34, Alec Leamas wrote:
> 
> 
> On 31/08/17 09:34, Alec Leamas wrote:
>>
>>
>> On 31/08/17 09:31, Bengt Martensson wrote:
>>>
>>> Since recently, make is broken in the sense that it keeps rebuilding 
>>> what is already built and up to date. To be more explicit
>>>
>> Yup, I've noted the same...
>>
> 
> It's probably about this piece in lib/Makefile.am
> 
>      input_map.lo: lirc/input_map.inc
> 
>      input_map.inc: lirc/input_map.inc
> 
>      lirc/input_map.inc: lirc
> 
> i. e., input_map.inc depends on the complete lirc directory which is a 
> symlink lirc -> .  and as such always  changed. Will look into it later.

Thanx. Then here is a fix (3 characters added...:


diff --git a/lib/Makefile.am b/lib/Makefile.am
index 065b0c9c..e513c537 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -128,7 +128,7 @@ lirc: .phony
  config.h: ../config.h
         -cp $? $@

-lirc/config.h: ../config.h lirc
+lirc/config.h: ../config.h | lirc
         -cp ../config.h $@

  ../paths.h: .phony
@@ -137,14 +137,14 @@ lirc/config.h: ../config.h lirc
  paths.h: ../paths.h
         -cp $? $@

-lirc/paths.h: ../paths.h lirc
+lirc/paths.h: ../paths.h | lirc
         -cp ../paths.h $@

  input_map.lo: lirc/input_map.inc

  input_map.inc: lirc/input_map.inc

-lirc/input_map.inc: lirc
+lirc/input_map.inc: | lirc
         PYTHON=$(PYTHON) $(top_srcdir)/tools/lirc-make-devinput \
             -i $(DEVINPUT_HEADER)  > input_map.inc
         PYTHON=$(PYTHON) $(top_srcdir)/tools/lirc-make-devinput \

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.