summaryrefslogtreecommitdiff
path: root/Makefile.in
Commit message (Collapse)AuthorAge
* btrfs-progs: filesystem: add 'du' commandMark Fasheh2016-03-14
| | | | | | | | | | | | | | | | | 'btrfs du' differs from regular du in that it will work to resolve which blocks are shared between files in its list. This gives the user a more accurate bytecount from which they can make decisions regarding management of their file space. We still print a total number of bytes counted (like regular du), but also print the number of bytes which were found to have been shared amongst the file set provided. From there it becomes trivial to calculate how much space is exclusively owned. Signed-off-by: Mark Fasheh <mfasheh@suse.de> [ rename files to reflect the filesystem command group, add GPL v2 file headers ] Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: extend per-binary objectsDavid Sterba2016-03-14
| | | | | | | | | The standalone utilities could share object files with the main utility, add a way to specify additional object files in a similar way to the extra libs. The variable name must match the binary plus _objects suffix and s/-/_/ . Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: introduce inspect-internal dump-superAlexander Fougner2016-03-14
| | | | | | | | The long-term plan is to merge the features of standalone tools into the btrfs binary, reducing the number of shipped binaries. Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: copy functionality of btrfs-debug-tree to inspect-internal ↵Alexander Fougner2016-03-14
| | | | | | | | | | subcommand The long-term plan is to merge the features of standalone tools into the btrfs binary, reducing the number of shipped binaries. Signed-off-by: Alexander Fougner <fougner89@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix symlink creation multiple timesHongxu Jia2016-02-26
| | | | | | | | | | | | | | | | | | | | | | | The rule to create symlink in Makefile caused parallel issue: $ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1 ... 1 [LN] libbtrfs.so.0 2 [LN] libbtrfs.so 3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0 5 ln -s -f libbtrfs.so.0.1 libbtrfs.so 6 ln -s -f libbtrfs.so.0.1 libbtrfs.so ... It failed occasionally: ... |symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink creation succeeded (No such file or directory). |ln: failed to create symbolic link 'libbtrfs.so': No such file or directory ... Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Makefile.in: Simplify/correct install-staticMike Gilbert2016-01-21
| | | | | | | | | | | install -D does not create the last component, so this failed if $(DESTDIR)$(bindir) did not already exist. There's no need for a loop here since install accepts multiple source arguments. Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: fix static buildNoah Massey2016-01-15
| | | | | | | | | Change in "btrfs-progs: introduce helper for parsing args without options" added a dependency on help.o that was duplicated for the static build. Signed-off-by: Noah Massey <noah.massey@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: introduce helper for parsing args without optionsDavid Sterba2016-01-14
| | | | | | | | | All commands should support the "--" option separator. This is transparently handled by getopt, but we don't use that everywhere. Introduce a helper for commands that take no options (just the path). The object file dependencies need to be adjusted a bit. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: fix builds with extra warnings, W=1David Sterba2016-01-12
| | | | | | Wrong variable name used in the main makefile. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: check the free space tree in btrfsckOmar Sandoval2016-01-12
| | | | | | | | | | This reuses the existing code for checking the free space cache, we just need to load the free space tree. While we do that, we check a couple of invariants on the free space tree itself. This requires pulling in some code from the kernel to exclude the super stripes. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: get sparse checking workingByongho Lee2016-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | When I run sparse checking it gives the following error: $ make C=1 V=1 gcc -MM -MG -MF cmds-fi-usage.o.d -MT cmds-fi-usage.o -MT \ cmds-fi-usage.static.o -MT cmds-fi-usage.o.d -g -O1 -Wall \ -D_FORTIFY_SOURCE=2 -include config.h -DBTRFS_FLAT_INCLUDES \ -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC cmds-fi-usage.c [SP] ctree.c sparse -g -O1 -Wall -D_FORTIFY_SOURCE=2 -include config.h \ -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -fno-strict-aliasing -fPIC \ -include -D__CHECKER__ -D__CHECK_ENDIAN__ -Wbitwise -Wuninitialized \ -Wshadow -Wundef -U_FORTIFY_SOURCE ctree.c builtin:1:15: error: unable to open '-D__CHECKER__' Makefile:177: recipe for target 'ctree.o' failed make: *** [ctree.o] Error 1 It means '$(check_defs)' is passed to sparse as NULL and looks '$(check_defs)'should be assigned before assigning '$(CHECKER_FLAGS)'. BTW, I'm not familiar with make tool so there could be some my misunderstanding and better solution. Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add test driver for fuzzed imagesDavid Sterba2015-11-02
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: tests: add mkfs testsDavid Sterba2015-11-02
| | | | | | Mkfs deserves it's own. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: make support for static checkers more genericDavid Sterba2015-10-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: a bit of makefile documentationDavid Sterba2015-10-21
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: build: allow to build with various compiler warningsDavid Sterba2015-10-21
| | | | | | | | | | Copied from linux kernel, 'make W=1' will build with various additional warnings turned on. There are 3 levels, combinations are possible. The build is quite noisy, not all warnings need to be fixed. A specific warning can be turned on by 'make EXTRA_CFLAGS=-Wsomething'. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: drop u option from ar invocationArnd Hannemann2015-09-08
| | | | | | | | | | | | | | | | | | | In newer distros (ubuntu 15.10, fedora rawhide) the binutils ar uses the new D flag per default to build deterministic binaries. Without this patch the following warning is issued, when building btrfs-progs: [AR] libbtrfs.a /usr/bin/ar: `u' modifier ignored since `D' is the default (see `U') For libtrfs.a performance benefit of the u option can be neglected, so drop the u option and silence the warning. In the future one might want to explicitly add the D option anyway. Signed-off-by: Arnd Hannemann <arnd@arndnet.de> Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: makefile: add support for additional build flagsDavid Sterba2015-09-01
| | | | | | | Allow fine tuned build options via EXTRA_CFLAGS and EXTRA_LDFLAGS variables. Useful for additional debugging flags or warnings etc. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: do not install static binaries over non-staticDavid Sterba2015-08-31
| | | | | | | The builds should be able to coexist, so we don't want to forcibly overwite the standard version. Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: Makefile: fix typo, dependencies for cmds-* filesDavid Sterba2015-06-16
| | | | | | | The dependency generation skipped all cmds-*.c files due to a typo in variable name, since day one. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: add driver script for misc testsDavid Sterba2015-06-02
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: add script to clean intermediate imagesDavid Sterba2015-05-25
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: cleanup, rename *disk_usage* files to usageDavid Sterba2015-04-22
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: tests: split make rule for fsck and convert tests, fix ↵David Sterba2015-04-07
| | | | | | | | | | prerequisities We'd like to run each class of tests separately. There were some missing prerequisities that should be/are verified by the tests, makefile rules have been synced. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Move -rdynamic linker only option to LDFLAGSQu Wenruo2015-02-11
| | | | | | | | | | | Same thing as clang cleanup patch commit 040b3f11ba6b5555d793a9ef79ed4d9032d22370 "btrfs-progs: Makefile: Move linker only option to LDFLAGS" But the move to autoconfig seems using old Makefile. So do it again. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add new find-root.[ch] infrastructureQu Wenruo2015-02-11
| | | | | | | | | | | | | Introduce new find-root.[ch] infrastructure which has better tree root judgment and uses much less codes to do it. The new infrastructure will only record tree blocks with highest level among its generation, and do better judgment whether the found tree block is the desired one(level + generation check other than the original generation only check). Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, do not install everything by defaultDavid Sterba2015-02-05
| | | | | | | | 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>
* btrfs-progs: autoconf: do not force fortify flagsDavid Sterba2015-02-05
| | | | | | Make it default, but let the user override it. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: largefile support is driven by configureDavid Sterba2015-02-05
| | | | | | Don't force it in the makefile. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: move custom CFLAGS from makefileDavid Sterba2015-02-05
| | | | | | | | Keep only flags that are required to build properly, current fine tunings are moved to the optional defaults in configure and can be overriden by the user. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, use the static library for the utilitiesDavid Sterba2015-02-04
| | | | | | | | | | Commit 2c2e6c4e12e5af15fd ("btrfs-progs: autoconf: cleanup compilation flags usage") added the shared library to the linking command so the resulting binaries depend dependent on libbtrfs.so. This is not intended. Reported-by: WorMzy Tykashi <wormzy.tykashi@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, fix the source of btrfsck symlinkDavid Sterba2015-02-04
| | | | | | | | The installed symlink points to the absolute path of btrfs, a relative link is enough. Reported-by: WorMzy Tykashi <wormzy.tykashi@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: set exec_prefix in makefileDavid Sterba2015-02-04
| | | | | | | Lost in the conversion and breaks the build unless set explicitly. Reported-by: WorMzy Tykashi <wormzy.tykashi@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: check btrfs-convert dependenciesDavid Sterba2015-02-03
| | | | | | Use the standard pkg-config checks. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: make btrfs-convert build optionalDavid Sterba2015-02-03
| | | | | | | Proposed at https://github.com/kdave/btrfs-progs/pull/6, I've added the configure options. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: generate documentation makefile as wellDavid Sterba2015-02-03
| | | | | | This is plain move to .in. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add btrfs_get_extent() and btrfs_punch_hole().Qu Wenruo2015-02-02
| | | | | | | | | | | | | | | | | | | Add btrfs_get_extent() and btrfs_punch_hole() for btrfs-progs. Btrfs_get_extent() will act much like kernel one, return the first extent that covers the given range. The difference will be that progs btrfs_get_extent() can't handle no-holes feature, which means caller should handle it carefully. Btrfs_punch_hole() will punch a hole in given range of given inode, however it differs from kernel one since it won't zero any page or drop any extents if there is any extent in the hole range. These functions are mainly used for later I_ERR_FILE_EXTENT_DISCOUNT repair function. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build more utilities by defaultDavid Sterba2015-01-28
| | | | | | Get better build coverage, btrfs-fragments require external libraries. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, use autoconf to detect RMDavid Sterba2015-01-28
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, clean all generated filesDavid Sterba2015-01-28
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: build, make build test work againDavid Sterba2015-01-28
| | | | | | We need to regenerate version.h after clean-all. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: add --disable-documentationKarel Zak2015-01-28
| | | | | Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: add --disable-backtraceKarel Zak2015-01-28
| | | | | | | It's better to use ./configure than manually edit Makefile. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: clean generated files, make version.h stuff more robustKarel Zak2015-01-28
| | | | | | | | - add rule to generated version.h when any relevant stuff changed - add rule to clean generated files on "make clean-all" Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: cleanup compilation flags usageKarel Zak2015-01-28
| | | | | | | | | | | | | | | | | | | - define basic default CFLAGS in configure.ac, because: * autoconf default is -g -O2, but btrfs uses -g -O1 * it's better to follow autoconf; standard way to modify CFLAGS is to call: CFLAGS="foo bar" ./configure - move all flags to one place in Makefile.in - don't use AM_CFLAGS, the CFLAGS and STATIC_CFLAGS are enough - don't mix objects and flags in $LIBS, it's more readable to add $(libs) to make rules Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: use paths and $*_LIBS from ./configureKarel Zak2015-01-28
| | | | | Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: check for build programs in ./configureKarel Zak2015-01-28
| | | | | Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: use ./configure to generate version.hKarel Zak2015-01-28
| | | | | | | | The original homemade solution is unnecessary, autotools provides better infrastructure to generate files. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: use config.hKarel Zak2015-01-28
| | | | | | | | | | | | | - the header file is generated by ./configure, the standard autotools way is to use -include config.h on compiler command line rather than include the file directly from code - remove _GNU_SOURCE from code, the macros is already defined in config.h by AC_USE_SYSTEM_EXTENSIONS autoconf macro Signed-off-by: Karel Zak <kzak@redhat.com> [_GNU_SOURCE changes already done] Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: autoconf: add ./configure scriptKarel Zak2015-01-28
- add ./autogen.sh script (necessary after git clean/clone) - add ./configure.ac - copy autotool helper scripts from automake - modify version.sh to be usable from the configure script - rename Makefile to Makefile.in and use basic variables from configure.ac Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz>