make install in the brave new build system world
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 9 lines · Christoph Hellwig
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 forinstall'. make[1]: Leaving directory `/root/xfsprogs-dev/include'/usr/bin/make-C libxfs install
make[1]: Entering directory `/root/xfsprogs-dev/libxfs'[DEP]
Quoted 8 lines
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.cinit.ckmem.clogitem.crdwr.ctrans.cutil.cxfs_alloc.cxfs_ialloc.cxfs_inode.cxfs_btree.cxfs_alloc_btree.cxfs_ialloc_btree.cxfs_bmap_btree.cxfs_da_btree.cxfs_dir2.cxfs_dir2_leaf.cxfs_attr_leaf.cxfs_dir2_block.cxfs_dir2_node.cxfs_dir2_data.cxfs_dir2_sf.cxfs_bmap.cxfs_mount.cxfs_rtalloc.cxfs_trans.cxfs_attr.clinux.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.
Quoted 1 line
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.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Quoted 2 lines · Dave Chinner
Quoted 1 line · Christoph Hellwig
When doing make install in xfsprogs I get a lot of spew like this:
....
Quoted 4 lines
Quoted 1 line
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.
Signature · 13 lines
Dave Chinner [email protected] 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 <[email protected]> --- Makefile | 9 ++++++--- include/buildrules | 4 ---- 2 files changed, 6 insertions(+), 7 deletions(-)
Makefile +6 -3
@@ -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)
include/buildrules +0 -4
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 10 lines · Dave Chinner
Quoted 2 lines · Dave Chinner
Quoted 1 line · Christoph Hellwig
When doing make install in xfsprogs I get a lot of spew like this:
....
Quoted 4 lines
Quoted 1 line
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · Dave Chinner
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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · Dave Chinner
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.
Quoted 6 lines
Quoted 2 lines
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.
Signature · 21 lines
Dave Chinner [email protected] 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 <[email protected]> --- Makefile | 13 ++++++++----- include/buildrules | 4 ---- man/Makefile | 4 ++-- mdrestore/Makefile | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-)
Makefile +8 -5
@@ -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)
include/buildrules +0 -4
@@ -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 -
man/Makefile +2 -2
@@ -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)
mdrestore/Makefile +1 -1
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Christoph Hellwig
Reviewed-byQuoted 13 lines · Dave Chinner
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
Quoted 8 lines
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
for this patch for now.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs