Bug 2794 - elfutils/backends builds twice
Summary: elfutils/backends builds twice
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Stepan Kasal
URL:
Keywords:
Depends on:
Blocks: frysk-elfutils 2654
  Show dependency treegraph
 
Reported: 2006-06-17 21:54 UTC by Stepan Kasal
Modified: 2006-06-26 17:48 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stepan Kasal 2006-06-17 21:54:55 UTC
When I run "make all" in elfutils twice, the second one starts rebuilding
elfutils/backends and things which depend on it.

Consequently, if I run "./configure; make; make install", then the "make
install" rebuilds elfutils/backends, because install depends on all.

I found the cause:
there is a rule
%.os: %.o
Because the *.o files are not mentoned in the Makefile, they are intermediate,
and thus get removed at the end.

During the first build, dependecy files are generated, and they mention all the
*.o files.

In the second build, these autogenerated dependencies are included by Makefile,
and the *.o files are no longer intermediate, do they are built and trigger the
rebuild of the rest.

The fis is to add
dummy-target-non-intermediate: $(i386_SRCS:.c=.o) ... $(s390_SRCS:.c=.o)

I'll generate a patch sometime the next week.
Comment 1 Stepan Kasal 2006-06-26 17:48:34 UTC
Fixed in the CVS, I used GNU make extensions, since I'm not the first one. ;-)

non-intermediate-objects: $(foreach m,$(modules),$($(m)_SRCS:.c=.o))