btrfs-progs: build, do not install everything by default
authorDavid Sterba <dsterba@suse.cz>
Thu, 5 Feb 2015 14:46:42 +0000 (15:46 +0100)
committerDavid Sterba <dsterba@suse.cz>
Thu, 5 Feb 2015 15:12:09 +0000 (16:12 +0100)
Commit 878affd47d ("btrfs-progs: build more utilities by default")
resulted in installation of new utilities, that were not installed
before. Make them build but do not install them.

Signed-off-by: David Sterba <dsterba@suse.cz>
Makefile.in

index 3606901..3a60398 100644 (file)
@@ -69,17 +69,21 @@ endif
 
 MAKEOPTS = --no-print-directory Q=$(Q)
 
-progs = mkfs.btrfs btrfs-debug-tree btrfsck \
-       btrfs btrfs-map-logical btrfs-image btrfs-zero-log \
+# build all by default
+progs = $(progs_install) btrfsck btrfs-corrupt-block btrfs-calc-size
+
+# install only selected
+progs_install = btrfs mkfs.btrfs btrfs-debug-tree \
+       btrfs-map-logical btrfs-image btrfs-zero-log \
        btrfs-find-root btrfstune btrfs-show-super \
-       btrfs-corrupt-block btrfs-select-super btrfs-calc-size
+       btrfs-select-super
 
 progs_extra = btrfs-fragments
 
 progs_static = $(foreach p,$(progs),$(p).static)
 
 ifneq ($(DISABLE_BTRFSCONVERT),1)
-progs += btrfs-convert
+progs_install += btrfs-convert
 endif
 
 # external libs required by various binaries; for btrfs-foo,
@@ -314,9 +318,9 @@ $(CLEANDIRS):
        @echo "Cleaning $(patsubst clean-%,%,$@)"
        $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst clean-%,%,$@) clean
 
-install: $(libs) $(progs) $(INSTALLDIRS)
+install: $(libs) $(progs_install) $(INSTALLDIRS)
        $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
-       $(INSTALL) $(progs) $(DESTDIR)$(bindir)
+       $(INSTALL) $(progs_install) $(DESTDIR)$(bindir)
        $(INSTALL) fsck.btrfs $(DESTDIR)$(bindir)
        # btrfsck is a link to btrfs in the src tree, make it so for installed file as well
        $(LN_S) -f btrfs $(DESTDIR)$(bindir)/btrfsck
@@ -340,7 +344,7 @@ uninstall:
        cd $(DESTDIR)$(incdir); $(RM) -f $(headers)
        $(RMDIR) -p --ignore-fail-on-non-empty $(DESTDIR)$(incdir)
        cd $(DESTDIR)$(libdir); $(RM) -f $(lib_links) $(libs)
-       cd $(DESTDIR)$(bindir); $(RM) -f btrfsck fsck.btrfs $(progs)
+       cd $(DESTDIR)$(bindir); $(RM) -f btrfsck fsck.btrfs $(progs_install)
 
 ifneq ($(MAKECMDGOALS),clean)
 -include $(objects:.o=.o.d) $(cmd-objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d)))