* make install in the brave new build system world
@ 2010-02-05 9:22 Christoph Hellwig
2010-02-05 10:44 ` Dave Chinner
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2010-02-05 9:22 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
When doing make install in xfsprogs I get a lot of spew like this:
/usr/bin/make -C include install
make[1]: Entering directory `/root/xfsprogs-dev/include'
make[1]: Nothing to be done for `install'.
make[1]: Leaving directory `/root/xfsprogs-dev/include'
/usr/bin/make -C libxfs install
make[1]: Entering directory `/root/xfsprogs-dev/libxfs'
[DEP]
gcc -MM -I. -g -O2 -DNDEBUG -DVERSION=\"3.1.1\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall cache.c init.c kmem.c logitem.c rdwr.c trans.c util.c xfs_alloc.c xfs_ialloc.c xfs_inode.c xfs_btree.c xfs_alloc_btree.c xfs_ialloc_btree.c xfs_bmap_btree.c xfs_da_btree.c xfs_dir2.c xfs_dir2_leaf.c xfs_attr_leaf.c xfs_dir2_block.c xfs_dir2_node.c xfs_dir2_data.c xfs_dir2_sf.c xfs_bmap.c xfs_mount.c xfs_rtalloc.c xfs_trans.c xfs_attr.c linux.c | /bin/sed -e 's,^\([^:]*\)\.o,\1.lo,' > .dep
make[1]: Leaving directory `/root/xfsprogs-dev/libxfs'
So it seems like for some reason we do
a) regenerate the dependencies in the install target (we already re-did
them once before as part of the all target implied by make install)
b) for some reason the new silent make rules don't apply to this.
Any idea why?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 9:22 make install in the brave new build system world Christoph Hellwig
@ 2010-02-05 10:44 ` Dave Chinner
2010-02-05 11:17 ` Dave Chinner
2010-02-05 11:28 ` Christoph Hellwig
0 siblings, 2 replies; 7+ messages in thread
From: Dave Chinner @ 2010-02-05 10:44 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Fri, Feb 05, 2010 at 04:22:29AM -0500, Christoph Hellwig wrote:
> When doing make install in xfsprogs I get a lot of spew like this:
>
> /usr/bin/make -C include install
> make[1]: Entering directory `/root/xfsprogs-dev/include'
> make[1]: Nothing to be done for `install'.
> make[1]: Leaving directory `/root/xfsprogs-dev/include'
> /usr/bin/make -C libxfs install
> make[1]: Entering directory `/root/xfsprogs-dev/libxfs'
> [DEP]
> gcc -MM -I. -g -O2 -DNDEBUG -DVERSION=\"3.1.1\" -DLOCALEDIR=\"/usr/share/locale\" -DPACKAGE=\"xfsprogs\" -I../include -DENABLE_GETTEXT -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 -funsigned-char -fno-strict-aliasing -Wall cache.c init.c kmem.c logitem.c rdwr.c trans.c util.c xfs_alloc.c xfs_ialloc.c xfs_inode.c xfs_btree.c xfs_alloc_btree.c xfs_ialloc_btree.c xfs_bmap_btree.c xfs_da_btree.c xfs_dir2.c xfs_dir2_leaf.c xfs_attr_leaf.c xfs_dir2_block.c xfs_dir2_node.c xfs_dir2_data.c xfs_dir2_sf.c xfs_bmap.c xfs_mount.c xfs_rtalloc.c xfs_trans.c xfs_attr.c linux.c | /bin/sed -e 's,^\([^:]*\)\.o,\1.lo,' > .dep
> make[1]: Leaving directory `/root/xfsprogs-dev/libxfs'
>
>
> So it seems like for some reason we do
>
> a) regenerate the dependencies in the install target (we already re-did
> them once before as part of the all target implied by make install)
The dependencies are always regenerated due to the default target
requiring the depend target. Rebuilding the dependencies is the only
way to catch changes between builds and so ensure the correct files
are rebuilt.
The install target is building the dependencies because it has a
dependency on the default target.
> b) for some reason the new silent make rules don't apply to this.
That's something I can't answer off the top of my head. I'll have a
look into it.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 10:44 ` Dave Chinner
@ 2010-02-05 11:17 ` Dave Chinner
2010-02-05 11:27 ` Christoph Hellwig
2010-02-05 11:28 ` Christoph Hellwig
1 sibling, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2010-02-05 11:17 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Fri, Feb 05, 2010 at 09:44:14PM +1100, Dave Chinner wrote:
> On Fri, Feb 05, 2010 at 04:22:29AM -0500, Christoph Hellwig wrote:
> > When doing make install in xfsprogs I get a lot of spew like this:
....
> > b) for some reason the new silent make rules don't apply to this.
>
> That's something I can't answer off the top of my head. I'll have a
> look into it.
Try the patch below.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
xfsprogs: clean up make install build
The install targets did not get the silent treatment like the
normal build targets. Shut them up.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
Makefile | 9 ++++++---
include/buildrules | 4 ----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 62c4258..31be846 100644
--- a/Makefile
+++ b/Makefile
@@ -107,13 +107,16 @@ install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
install-qa: install $(addsuffix -install-qa,$(SUBDIRS))
%-install:
- $(MAKE) -C $* install
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install
%-install-dev:
- $(MAKE) -C $* install-dev
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev
%-install-qa:
- $(MAKE) -C $* install-qa
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install-qa
distclean: clean
$(Q)rm -f $(DISTDIRT)
diff --git a/include/buildrules b/include/buildrules
index 1695e23..beb469b 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -101,7 +101,3 @@ ltdepend: $(CFILES) $(HFILES)
depend: $(CFILES) $(HFILES)
@echo " [DEP]"
$(Q)$(MAKEDEP) $(CFILES) > .dep
-
-
-# $(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1,' > .dep
-
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 11:17 ` Dave Chinner
@ 2010-02-05 11:27 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2010-02-05 11:27 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, xfs
On Fri, Feb 05, 2010 at 10:17:41PM +1100, Dave Chinner wrote:
> On Fri, Feb 05, 2010 at 09:44:14PM +1100, Dave Chinner wrote:
> > On Fri, Feb 05, 2010 at 04:22:29AM -0500, Christoph Hellwig wrote:
> > > When doing make install in xfsprogs I get a lot of spew like this:
> ....
> > > b) for some reason the new silent make rules don't apply to this.
> >
> > That's something I can't answer off the top of my head. I'll have a
> > look into it.
>
> Try the patch below.
That makes it a bit better, but it still prints the full INSTALL and
LTINSTALL lines.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 10:44 ` Dave Chinner
2010-02-05 11:17 ` Dave Chinner
@ 2010-02-05 11:28 ` Christoph Hellwig
2010-02-05 11:48 ` Dave Chinner
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2010-02-05 11:28 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, xfs
On Fri, Feb 05, 2010 at 09:44:14PM +1100, Dave Chinner wrote:
> The dependencies are always regenerated due to the default target
> requiring the depend target. Rebuilding the dependencies is the only
> way to catch changes between builds and so ensure the correct files
> are rebuilt.
>
> The install target is building the dependencies because it has a
> dependency on the default target.
Well, it's building the dependecies twice - once by invoking the
default target, but they are also rebuilt again when the actuall
install rules are called. The latter is pretty clearly superflous.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 11:28 ` Christoph Hellwig
@ 2010-02-05 11:48 ` Dave Chinner
2010-02-08 10:29 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2010-02-05 11:48 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
On Fri, Feb 05, 2010 at 06:28:50AM -0500, Christoph Hellwig wrote:
> On Fri, Feb 05, 2010 at 09:44:14PM +1100, Dave Chinner wrote:
> > The dependencies are always regenerated due to the default target
> > requiring the depend target. Rebuilding the dependencies is the only
> > way to catch changes between builds and so ensure the correct files
> > are rebuilt.
> >
> > The install target is building the dependencies because it has a
> > dependency on the default target.
>
> Well, it's building the dependecies twice - once by invoking the
> default target, but they are also rebuilt again when the actuall
> install rules are called. The latter is pretty clearly superflous.
Ah, there's a double depenency chain.
The top level make file has:
install: default
Which causes "make install" to run the top level default target,
which runs the default target in all the target subdirs.
Then, in each subdir, the makefile has:
install: default
Which when then install target is actually run, does another
dependency check because it's got a local dependency on the depend
target via the default target.
Replace the previous patch with the one below and try again.
Now the "make install" will rebuild targets out of the local
dependencies rather than a separate run of the top level default
target (i.e. only traverse directories once).
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
xfsprogs: clean up make install build V2
The install targets did not get the silent treatment like the
normal build targets. Shut them up.
Also, remove the top level install target dependency on the default
target. Each sub-directory already defines the correct dependencies
for the install targets and so all the rebuilds can be done in one
traversal of the subdirectories via the install rules.
Signed-off-by: Dave Chinner <david@fromorbit.com>
---
Makefile | 13 ++++++++-----
include/buildrules | 4 ----
man/Makefile | 4 ++--
mdrestore/Makefile | 2 +-
4 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 62c4258..1905261 100644
--- a/Makefile
+++ b/Makefile
@@ -98,22 +98,25 @@ include/platform_defs.h: include/builddefs
$(MAKE) $(MAKEOPTS) $(AM_MAKEFLAGS) include/builddefs; \
fi
-install: default $(addsuffix -install,$(SUBDIRS))
+install: $(addsuffix -install,$(SUBDIRS))
$(INSTALL) -m 755 -d $(PKG_DOC_DIR)
$(INSTALL) -m 644 README $(PKG_DOC_DIR)
-install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
+install-dev: $(addsuffix -install-dev,$(SUBDIRS))
install-qa: install $(addsuffix -install-qa,$(SUBDIRS))
%-install:
- $(MAKE) -C $* install
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install
%-install-dev:
- $(MAKE) -C $* install-dev
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev
%-install-qa:
- $(MAKE) -C $* install-qa
+ @echo "Installing $@"
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install-qa
distclean: clean
$(Q)rm -f $(DISTDIRT)
diff --git a/include/buildrules b/include/buildrules
index 1695e23..beb469b 100644
--- a/include/buildrules
+++ b/include/buildrules
@@ -101,7 +101,3 @@ ltdepend: $(CFILES) $(HFILES)
depend: $(CFILES) $(HFILES)
@echo " [DEP]"
$(Q)$(MAKEDEP) $(CFILES) > .dep
-
-
-# $(Q)$(MAKEDEP) $(CFILES) | $(SED) -e 's,^\([^:]*\)\.o,\1,' > .dep
-
diff --git a/man/Makefile b/man/Makefile
index 2b5e89c..863284c 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -14,9 +14,9 @@ install : $(addsuffix -install,$(SUBDIRS))
install-dev : $(addsuffix -install-dev,$(SUBDIRS))
%-install:
- $(MAKE) -C $* install
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install
%-install-dev:
- $(MAKE) -C $* install-dev
+ $(Q)$(MAKE) $(MAKEOPTS) -C $* install-dev
include $(BUILDRULES)
diff --git a/mdrestore/Makefile b/mdrestore/Makefile
index fd35d80..ca2d1a0 100644
--- a/mdrestore/Makefile
+++ b/mdrestore/Makefile
@@ -16,7 +16,7 @@ default: depend $(LTCOMMAND)
include $(BUILDRULES)
-install:
+install: default
$(INSTALL) -m 755 -d $(PKG_SBIN_DIR)
$(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_SBIN_DIR)
install-dev:
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: make install in the brave new build system world
2010-02-05 11:48 ` Dave Chinner
@ 2010-02-08 10:29 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2010-02-08 10:29 UTC (permalink / raw)
To: Dave Chinner; +Cc: Christoph Hellwig, xfs
On Fri, Feb 05, 2010 at 10:48:56PM +1100, Dave Chinner wrote:
> Ah, there's a double depenency chain.
>
> The top level make file has:
>
> install: default
>
> Which causes "make install" to run the top level default target,
> which runs the default target in all the target subdirs.
>
> Then, in each subdir, the makefile has:
>
> install: default
>
> Which when then install target is actually run, does another
> dependency check because it's got a local dependency on the depend
> target via the default target.
>
> Replace the previous patch with the one below and try again.
> Now the "make install" will rebuild targets out of the local
> dependencies rather than a separate run of the top level default
> target (i.e. only traverse directories once).
Thanks, this looks much better. We still don't implement the
quite behaviour for most install targets, but that should be relatively
simple to fix. Maybe we can even replace all those handcode install
rules with generic one - I'll look into that once I get a bit time.
So
Reviewed-by: Christoph Hellwig <hch@lst.de>
for this patch for now.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-02-08 10:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 9:22 make install in the brave new build system world Christoph Hellwig
2010-02-05 10:44 ` Dave Chinner
2010-02-05 11:17 ` Dave Chinner
2010-02-05 11:27 ` Christoph Hellwig
2010-02-05 11:28 ` Christoph Hellwig
2010-02-05 11:48 ` Dave Chinner
2010-02-08 10:29 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox