3 # all all main tools and the shared library
4 # static build static bnaries, requires static version of the libraries
5 # test run the full testsuite
6 # install install to default location (/usr/local)
7 # clean clean built binaries (not the documentation)
8 # clean-all clean as above, clean docs and generated files
10 # Tuning by variables (environment or make arguments):
11 # V=1 verbose, print command lines (default: quiet)
12 # C=1 run checker before compilation (default checker: sparse)
13 # D=1 debugging build, turn off optimizations
14 # D=dflags dtto, turn on additional debugging features:
15 # verbose - print file:line along with error/warning messages
16 # trace - print trace before the error/warning messages
17 # abort - call abort() on first error (dumps core)
18 # all - shortcut for all of the above
19 # asan - enable address sanitizer compiler feature
20 # tsan - enable thread sanitizer compiler feature
21 # ubsan - undefined behaviour sanitizer compiler feature
22 # bcheck - extended build checks
23 # W=123 build with warnings (default: off)
24 # DEBUG_CFLAGS additional compiler flags for debugging build
25 # EXTRA_CFLAGS additional compiler flags
26 # EXTRA_LDFLAGS additional linker flags
28 # Testing-specific options (see also tests/README.md):
29 # TEST=GLOB run test(s) from directories matching GLOB
30 # TEST_LOG=tty print name of a command run via the execution helpers
31 # TEST_LOG=dump dump testing log file when a test fails
34 # CHECKER static checker binary to be called (default: sparse)
35 # CHECKER_FLAGS flags to pass to CHECKER, can override CFLAGS
38 # Export all variables to sub-makes by default
42 ifneq ($(MAKEFILE_INC_INCLUDED),yes)
43 $(error Makefile.inc not generated, please configure first)
47 CSCOPE_CMD := cscope -u -b -c -q
49 include Makefile.extrawarn
54 DEBUG_CFLAGS_DEFAULT = -O0 -U_FORTIFY_SOURCE -ggdb3
55 DEBUG_CFLAGS_INTERNAL =
58 TOPDIR := $(shell pwd)
61 CFLAGS = $(SUBST_CFLAGS) \
64 -DBTRFS_FLAT_INCLUDES \
66 -fno-strict-aliasing \
69 -I$(TOPDIR)/kernel-lib \
71 $(DEBUG_CFLAGS_INTERNAL) \
74 LDFLAGS = $(SUBST_LDFLAGS) \
75 -rdynamic -L$(TOPDIR) $(EXTRA_LDFLAGS)
78 LIBBTRFS_LIBS = $(LIBS_BASE)
80 # Static compilation flags
81 STATIC_CFLAGS = $(CFLAGS) -ffunction-sections -fdata-sections
82 STATIC_LDFLAGS = -static -Wl,--gc-sections
83 STATIC_LIBS = $(STATIC_LIBS_BASE)
85 # don't use FORTIFY with sparse because glibc with FORTIFY can
86 # generate so many sparse errors that sparse stops parsing,
87 # which masks real errors that we want to see.
89 check_defs := .cc-defines.h
90 CHECKER_FLAGS := -include $(check_defs) -D__CHECKER__ \
91 -D__CHECK_ENDIAN__ -Wbitwise -Wuninitialized -Wshadow -Wundef \
94 objects = ctree.o disk-io.o kernel-lib/radix-tree.o extent-tree.o print-tree.o \
95 root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
96 extent-cache.o extent_io.o volumes.o utils.o repair.o \
97 qgroup.o free-space-cache.o kernel-lib/list_sort.o props.o \
98 kernel-shared/ulist.o qgroup-verify.o backref.o string-table.o task-utils.o \
99 inode.o file.o find-root.o free-space-tree.o help.o send-dump.o \
100 fsfeatures.o kernel-lib/tables.o kernel-lib/raid56.o
101 cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
102 cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
103 cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \
104 cmds-restore.o cmds-rescue.o chunk-recover.o super-recover.o \
105 cmds-property.o cmds-fi-usage.o cmds-inspect-dump-tree.o \
106 cmds-inspect-dump-super.o cmds-inspect-tree-stats.o cmds-fi-du.o \
108 libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
109 kernel-lib/crc32c.o messages.o \
110 uuid-tree.o utils-lib.o rbtree-utils.o
111 libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
112 kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
113 kernel-lib/radix-tree.h kernel-lib/sizes.h kernel-lib/raid56.h \
114 extent-cache.h extent_io.h ioctl.h ctree.h btrfsck.h version.h
115 convert_objects = convert/main.o convert/common.o convert/source-fs.o \
116 convert/source-ext2.o convert/source-reiserfs.o
117 mkfs_objects = mkfs/main.o mkfs/common.o
119 TESTS = fsck-tests.sh convert-tests.sh
121 udev_rules = 64-btrfs-dm.rules
123 ifeq ("$(origin V)", "command line")
130 ifeq ($(BUILD_VERBOSE),1)
136 ifeq ("$(origin D)", "command line")
137 DEBUG_CFLAGS_INTERNAL = $(DEBUG_CFLAGS_DEFAULT) $(DEBUG_CFLAGS)
140 ifneq (,$(findstring verbose,$(D)))
141 DEBUG_CFLAGS_INTERNAL += -DDEBUG_VERBOSE_ERROR=1
144 ifneq (,$(findstring trace,$(D)))
145 DEBUG_CFLAGS_INTERNAL += -DDEBUG_TRACE_ON_ERROR=1
148 ifneq (,$(findstring abort,$(D)))
149 DEBUG_CFLAGS_INTERNAL += -DDEBUG_ABORT_ON_ERROR=1
152 ifneq (,$(findstring all,$(D)))
153 DEBUG_CFLAGS_INTERNAL += -DDEBUG_VERBOSE_ERROR=1
154 DEBUG_CFLAGS_INTERNAL += -DDEBUG_TRACE_ON_ERROR=1
155 DEBUG_CFLAGS_INTERNAL += -DDEBUG_ABORT_ON_ERROR=1
158 ifneq (,$(findstring asan,$(D)))
159 DEBUG_CFLAGS_INTERNAL += -fsanitize=address
162 ifneq (,$(findstring tsan,$(D)))
163 DEBUG_CFLAGS_INTERNAL += -fsanitize=thread -fPIE
164 LD_FLAGS += -fsanitize=thread -ltsan -pie
167 ifneq (,$(findstring ubsan,$(D)))
168 DEBUG_CFLAGS_INTERNAL += -fsanitize=undefined
171 ifneq (,$(findstring bcheck,$(D)))
172 DEBUG_CFLAGS_INTERNAL += -DDEBUG_BUILD_CHECKS
175 MAKEOPTS = --no-print-directory Q=$(Q)
177 # build all by default
178 progs = $(progs_install) btrfsck btrfs-corrupt-block
180 # install only selected
181 progs_install = btrfs mkfs.btrfs btrfs-debug-tree \
182 btrfs-map-logical btrfs-image btrfs-zero-log \
183 btrfs-find-root btrfstune \
186 # other tools, not built by default
187 progs_extra = btrfs-fragments btrfs-calc-size btrfs-show-super
189 progs_static = $(foreach p,$(progs),$(p).static)
191 ifneq ($(DISABLE_BTRFSCONVERT),1)
192 progs_install += btrfs-convert
195 # external libs required by various binaries; for btrfs-foo,
196 # specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules below
197 btrfs_convert_cflags = -DBTRFSCONVERT_EXT2=$(BTRFSCONVERT_EXT2)
198 btrfs_convert_cflags += -DBTRFSCONVERT_REISERFS=$(BTRFSCONVERT_REISERFS)
199 btrfs_fragments_libs = -lgd -lpng -ljpeg -lfreetype
200 btrfs_debug_tree_objects = cmds-inspect-dump-tree.o
201 btrfs_show_super_objects = cmds-inspect-dump-super.o
202 btrfs_calc_size_objects = cmds-inspect-tree-stats.o
204 # collect values of the variables above
205 standalone_deps = $(foreach dep,$(patsubst %,%_objects,$(subst -,_,$(filter btrfs-%, $(progs)))),$($(dep)))
208 BUILDDIRS = $(patsubst %,build-%,$(SUBDIRS))
209 INSTALLDIRS = $(patsubst %,install-%,$(SUBDIRS))
210 CLEANDIRS = $(patsubst %,clean-%,$(SUBDIRS))
212 ifneq ($(DISABLE_DOCUMENTATION),1)
213 BUILDDIRS += build-Documentation
214 INSTALLDIRS += install-Documentation
219 .PHONY: $(INSTALLDIRS)
222 .PHONY: all install clean
225 # Create all the static targets
226 static_objects = $(patsubst %.o, %.static.o, $(objects))
227 static_cmds_objects = $(patsubst %.o, %.static.o, $(cmds_objects))
228 static_libbtrfs_objects = $(patsubst %.o, %.static.o, $(libbtrfs_objects))
229 static_convert_objects = $(patsubst %.o, %.static.o, $(convert_objects))
230 static_mkfs_objects = $(patsubst %.o, %.static.o, $(mkfs_objects))
232 libs_shared = libbtrfs.so.0.1
233 libs_static = libbtrfs.a
234 libs = $(libs_shared) $(libs_static)
235 lib_links = libbtrfs.so.0 libbtrfs.so
236 headers = $(libbtrfs_headers)
238 # make C=1 to enable sparse
240 # We're trying to use sparse against glibc headers which go wild
241 # trying to use internal compiler macros to test features. We
242 # copy gcc's and give them to sparse. But not __SIZE_TYPE__
243 # 'cause sparse defines that one.
245 dummy := $(shell $(CC) -dM -E -x c - < /dev/null | \
246 grep -v __SIZE_TYPE__ > $(check_defs))
255 $(Q)$(CC) -MD -MM -MG -MF $@ -MT $(@:.o.d=.o) -MT $(@:.o.d=.static.o) -MT $@ $(CFLAGS) $<
258 # Pick from per-file variables, btrfs_*_cflags
261 @$(check_echo) " [SP] $<"
262 $(Q)$(check) $(CFLAGS) $(CHECKER_FLAGS) $<
264 $(Q)$(CC) $(CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.o=%)-cflags)) \
265 $($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags))
269 $(Q)$(CC) $(STATIC_CFLAGS) -c $< -o $@ $($(subst -,_,$(@:%.static.o=%)-cflags)) \
270 $($(subst -,_,btrfs-$(@:%/$(notdir $@)=%)-cflags))
272 all: $(progs) libbtrfs $(BUILDDIRS)
273 $(SUBDIRS): $(BUILDDIRS)
275 @echo "Making all in $(patsubst build-%,%,$@)"
276 $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst build-%,%,$@)
278 test-convert: btrfs btrfs-convert
279 @echo " [TEST] convert-tests.sh"
280 $(Q)bash tests/convert-tests.sh
282 test-check: test-fsck
283 test-fsck: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs btrfstune
284 @echo " [TEST] fsck-tests.sh"
285 $(Q)bash tests/fsck-tests.sh
287 test-misc: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs btrfstune fssum \
288 btrfs-zero-log btrfs-find-root btrfs-select-super
289 @echo " [TEST] misc-tests.sh"
290 $(Q)bash tests/misc-tests.sh
292 test-mkfs: btrfs mkfs.btrfs
293 @echo " [TEST] mkfs-tests.sh"
294 $(Q)bash tests/mkfs-tests.sh
297 @echo " [TEST] fuzz-tests.sh"
298 $(Q)bash tests/fuzz-tests.sh
301 @echo " [TEST] cli-tests.sh"
302 $(Q)bash tests/cli-tests.sh
305 @echo "Cleaning tests"
306 $(Q)bash tests/clean-tests.sh
309 @tmpdest=`mktemp --tmpdir -d btrfs-inst.XXXXXX` && \
310 echo "Test installation to $$tmpdest" && \
311 $(MAKE) $(MAKEOPTS) DESTDIR=$$tmpdest install && \
312 $(RM) -rf -- $$tmpdest
314 test: test-fsck test-mkfs test-convert test-misc test-fuzz test-cli
317 # NOTE: For static compiles, you need to have all the required libs
318 # static equivalent available
320 static: $(progs_static)
322 version.h: version.sh version.h.in configure.ac
324 $(Q)bash ./config.status --silent $@
326 mktables: kernel-lib/mktables.c
328 $(Q)$(CC) $(CFLAGS) $< -o $@
330 # the target can be regenerated manually using mktables, but a local copy is
331 # kept so the build process is simpler
334 $(Q)./mktables > $@ || ($(RM) -f $@ && exit 1)
336 libbtrfs: $(libs_shared) $(lib_links)
338 $(libs_shared): $(libbtrfs_objects) $(lib_links) send.h
340 $(Q)$(CC) $(CFLAGS) $(libbtrfs_objects) $(LDFLAGS) $(LIBBTRFS_LIBS) \
341 -shared -Wl,-soname,libbtrfs.so.0 -o libbtrfs.so.0.1
343 $(libs_static): $(libbtrfs_objects)
345 $(Q)$(AR) cr libbtrfs.a $(libbtrfs_objects)
349 $(Q)$(LN_S) -f libbtrfs.so.0.1 $@
351 # keep intermediate files from the below implicit rules around
352 .PRECIOUS: $(addsuffix .o,$(progs))
354 # Make any btrfs-foo out of btrfs-foo.o, with appropriate libs.
355 # The $($(subst...)) bits below takes the btrfs_*_libs definitions above and
356 # turns them into a list of libraries to link against if they exist
358 # For static variants, use an extra $(subst) to get rid of the ".static"
359 # from the target name before translating to list of libs
361 btrfs-%.static: btrfs-%.static.o $(static_objects) $(patsubst %.o,%.static.o,$(standalone_deps)) $(static_libbtrfs_objects)
363 $(Q)$(CC) -o $@ $@.o $(static_objects) \
364 $(patsubst %.o, %.static.o, $($(subst -,_,$(subst .static,,$@)-objects))) \
365 $(static_libbtrfs_objects) $(STATIC_LDFLAGS) \
366 $($(subst -,_,$(subst .static,,$@)-libs)) $(STATIC_LIBS)
368 btrfs-%: btrfs-%.o $(objects) $(standalone_deps) $(libs_static)
370 $(Q)$(CC) -o $@ $(objects) $@.o \
371 $($(subst -,_,$@-objects)) \
373 $(LDFLAGS) $(LIBS) $($(subst -,_,$@-libs))
375 btrfs: btrfs.o $(objects) $(cmds_objects) $(libs_static)
377 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
379 btrfs.static: btrfs.static.o $(static_objects) $(static_cmds_objects) $(static_libbtrfs_objects)
381 $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
383 # For backward compatibility, 'btrfs' changes behaviour to fsck if it's named 'btrfsck'
386 $(Q)$(LN_S) -f btrfs btrfsck
388 btrfsck.static: btrfs.static
392 mkfs.btrfs: $(mkfs_objects) $(objects) $(libs_static)
394 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
396 mkfs.btrfs.static: $(static_mkfs_objects) $(static_objects) $(static_libbtrfs_objects)
398 $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
400 btrfstune: btrfstune.o $(objects) $(libs_static)
402 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
404 btrfstune.static: btrfstune.static.o $(static_objects) $(static_libbtrfs_objects)
406 $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
408 btrfs-image: image/main.o $(objects) $(libs_static)
410 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
412 btrfs-image.static: image/main.static.o $(static_objects) $(static_libbtrfs_objects)
414 $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
416 btrfs-convert: $(convert_objects) $(objects) $(libs_static)
418 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(btrfs_convert_libs) $(LIBS)
420 btrfs-convert.static: $(static_convert_objects) $(static_objects) $(static_libbtrfs_objects)
422 $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS)
424 dir-test: dir-test.o $(objects) $(libs)
426 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
428 quick-test: quick-test.o $(objects) $(libs)
430 $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
432 ioctl-test.o: ioctl-test.c ioctl.h kerncompat.h ctree.h
434 $(Q)$(CC) $(CFLAGS) -c $< -o $@
436 ioctl-test-32.o: ioctl-test.c ioctl.h kerncompat.h ctree.h
438 $(Q)$(CC) $(CFLAGS) -m32 -c $< -o $@
440 ioctl-test-64.o: ioctl-test.c ioctl.h kerncompat.h ctree.h
442 $(Q)$(CC) $(CFLAGS) -m64 -c $< -o $@
444 ioctl-test: ioctl-test.o
446 $(Q)$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
447 @echo " ?[PAHOLE] $@.pahole"
448 -$(Q)pahole $@ > $@.pahole
450 ioctl-test-32: ioctl-test-32.o
452 $(Q)$(CC) -m32 -o $@ $< $(LDFLAGS)
453 @echo " ?[PAHOLE] $@.pahole"
454 -$(Q)pahole $@ > $@.pahole
456 ioctl-test-64: ioctl-test-64.o
458 $(Q)$(CC) -m64 -o $@ $< $(LDFLAGS)
459 @echo " ?[PAHOLE] $@.pahole"
460 -$(Q)pahole $@ > $@.pahole
462 test-ioctl: ioctl-test ioctl-test-32 ioctl-test-64
463 @echo " [TEST/ioctl]"
464 $(Q)./ioctl-test > ioctl-test.log
465 $(Q)./ioctl-test-32 > ioctl-test-32.log
466 $(Q)./ioctl-test-64 > ioctl-test-64.log
468 library-test: library-test.c $(libs_shared)
469 @echo " [TEST PREP] $@"$(eval TMPD=$(shell mktemp -d))
470 $(Q)mkdir -p $(TMPD)/include/btrfs && \
471 cp $(libbtrfs_headers) $(TMPD)/include/btrfs && \
472 cd $(TMPD) && $(CC) -I$(TMPD)/include -o $@ $(addprefix $(TOPDIR)/,$^) -Wl,-rpath=$(TOPDIR) -lbtrfs
473 @echo " [TEST RUN] $@"
474 $(Q)cd $(TMPD) && ./$@
475 @echo " [TEST CLEAN] $@"
476 $(Q)$(RM) -rf -- $(TMPD)
478 library-test.static: library-test.c $(libs_static)
479 @echo " [TEST PREP] $@"$(eval TMPD=$(shell mktemp -d))
480 $(Q)mkdir -p $(TMPD)/include/btrfs && \
481 cp $(libbtrfs_headers) $(TMPD)/include/btrfs && \
482 cd $(TMPD) && $(CC) -I$(TMPD)/include -o $@ $(addprefix $(TOPDIR)/,$^) $(STATIC_LDFLAGS) $(STATIC_LIBS)
483 @echo " [TEST RUN] $@"
484 $(Q)cd $(TMPD) && ./$@
485 @echo " [TEST CLEAN] $@"
486 $(Q)$(RM) -rf -- $(TMPD)
488 fssum: tests/fssum.c tests/sha224-256.c
490 $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
492 test-build: test-build-pre test-build-real
495 $(MAKE) $(MAKEOPTS) clean-all
500 $(MAKE) $(MAKEOPTS) library-test
501 -$(MAKE) $(MAKEOPTS) library-test.static
502 $(MAKE) $(MAKEOPTS) -j 8 all
503 -$(MAKE) $(MAKEOPTS) -j 8 static
504 $(MAKE) $(MAKEOPTS) -j 8 $(progs_extra)
507 $(Q)$(MAKE) $(MAKEOPTS) -C Documentation
510 @echo " [TAGS] $(TAGS_CMD)"
511 $(Q)$(TAGS_CMD) *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch]
514 @echo " [CSCOPE] $(CSCOPE_CMD)"
515 $(Q)ls -1 *.[ch] image/*.[ch] convert/*.[ch] mkfs/*.[ch] > cscope.files
518 clean-all: clean clean-doc clean-gen
522 $(Q)$(RM) -f -- $(progs) *.o *.o.d \
523 kernel-lib/*.o kernel-lib/*.o.d \
524 kernel-shared/*.o kernel-shared/*.o.d \
525 image/*.o image/*.o.d \
526 convert/*.o convert/*.o.d \
527 mkfs/*.o mkfs/*.o.d \
528 dir-test ioctl-test quick-test library-test library-test-static \
529 mktables btrfs.static mkfs.btrfs.static fssum \
531 $(libs) $(lib_links) \
532 $(progs_static) $(progs_extra)
535 @echo "Cleaning Documentation"
536 $(Q)$(MAKE) $(MAKEOPTS) -C Documentation clean
539 @echo "Cleaning Generated Files"
540 $(Q)$(RM) -rf -- version.h config.status config.cache connfig.log \
541 configure.lineno config.status.lineno Makefile.inc \
542 Documentation/Makefile tags \
543 cscope.files cscope.out cscope.in.out cscope.po.out \
544 config.log config.h config.h.in~ aclocal.m4 \
545 configure autom4te.cache/ config/
548 @echo "Cleaning $(patsubst clean-%,%,$@)"
549 $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst clean-%,%,$@) clean
551 install: $(libs) $(progs_install) $(INSTALLDIRS)
552 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
553 $(INSTALL) $(progs_install) $(DESTDIR)$(bindir)
554 $(INSTALL) fsck.btrfs $(DESTDIR)$(bindir)
555 # btrfsck is a link to btrfs in the src tree, make it so for installed file as well
556 $(LN_S) -f btrfs $(DESTDIR)$(bindir)/btrfsck
557 $(INSTALL) -m755 -d $(DESTDIR)$(libdir)
558 $(INSTALL) $(libs) $(DESTDIR)$(libdir)
559 cp -a $(lib_links) $(DESTDIR)$(libdir)
560 $(INSTALL) -m755 -d $(DESTDIR)$(incdir)
561 $(INSTALL) -m644 $(headers) $(DESTDIR)$(incdir)
563 $(INSTALL) -m755 -d $(DESTDIR)$(udevruledir)
564 $(INSTALL) -m644 $(udev_rules) $(DESTDIR)$(udevruledir)
567 install-static: $(progs_static) $(INSTALLDIRS)
568 $(INSTALL) -m755 -d $(DESTDIR)$(bindir)
569 $(INSTALL) $(progs_static) $(DESTDIR)$(bindir)
570 # btrfsck is a link to btrfs in the src tree, make it so for installed file as well
571 $(LN_S) -f btrfs.static $(DESTDIR)$(bindir)/btrfsck.static
574 @echo "Making install in $(patsubst install-%,%,$@)"
575 $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst install-%,%,$@) install
578 $(Q)$(MAKE) $(MAKEOPTS) -C Documentation uninstall
579 cd $(DESTDIR)$(incdir); $(RM) -f -- $(headers)
580 $(RMDIR) -p --ignore-fail-on-non-empty -- $(DESTDIR)$(incdir)
581 cd $(DESTDIR)$(libdir); $(RM) -f -- $(lib_links) $(libs)
582 cd $(DESTDIR)$(bindir); $(RM) -f -- btrfsck fsck.btrfs $(progs_install)
584 ifneq ($(MAKECMDGOALS),clean)
585 -include $(objects:.o=.o.d) $(cmds_objects:.o=.o.d) $(subst .btrfs,, $(filter-out btrfsck.o.d, $(progs:=.o.d)))