On Sun, Apr 21, 2013 at 05:22:37PM -0500, Eric Sandeen wrote: > This gets rid of a lot of the cut and pasted rules for > each individual command, and as an added bonus makes it > easy to build any btrfs-$FOO statically as well, i.e. > > # make btrfs-convert.static
Nice! > +# keep intermediate files from the below implicit rules around > +.PRECIOUS: $(addsuffix .o,$(progs)) I guess you saw something like $ make btrfs-calc-size.static ... rm btrfs-calc-size.static.o at the end of the make output (though there's not rule to rm the file). I've found this blogpost http://darrendev.blogspot.cz/2008/06/stopping-make-delete-intermediate-files.html that describes how to prevent the intermediate files to disappear, and I've verified that this -.PRECIOUS: $(addsuffix .o,$(progs)) +.SECONDARY: works as expected in our case. Besides this change I moved the per-prog libs variables up in the Makefile so the configurable settings are kept close together: +# external libs required by various binaries; for btrfs-foo, +# specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules below +btrfs_convert_libs = -lext2fs -lcom_err +btrfs_image_libs = -lpthread +btrfs_fragment_libs = -lgd -lpng -ljpeg -lfreetype david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html