X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=Makefile;h=6e5d0e56aa7fbc52bac355cfd794cbeba3741907;hb=HEAD;hp=d283c7b42d1fc0044485c34321d3e929c6d2137f;hpb=0a284fc4ffcbb46f0a4b921415ef12a9c75fa05c;p=bcachefs-tools-debian diff --git a/Makefile b/Makefile index d283c7b..6e5d0e5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -VERSION=1.4.0 +VERSION=1.6.3 PREFIX?=/usr/local +LIBEXECDIR?=$(PREFIX)/libexec PKG_CONFIG?=pkg-config INSTALL=install LN=ln @@ -30,7 +31,7 @@ CFLAGS+=-std=gnu11 -O2 -g -MMD -Wall -fPIC \ -Wno-deprecated-declarations \ -fno-strict-aliasing \ -fno-delete-null-pointer-checks \ - -I. -Iinclude -Iraid \ + -I. -Ic_src -Iinclude -Iraid \ -D_FILE_OFFSET_BITS=64 \ -D_GNU_SOURCE \ -D_LGPL_SOURCE \ @@ -55,12 +56,11 @@ CARGO_ARGS=${CARGO_TOOLCHAIN} CARGO=cargo $(CARGO_ARGS) CARGO_PROFILE=release # CARGO_PROFILE=debug -CARGO_MANIFEST=--manifest-path rust-src/Cargo.toml CARGO_BUILD_ARGS=--$(CARGO_PROFILE) -CARGO_BUILD=$(CARGO) build $(CARGO_BUILD_ARGS) $(CARGO_MANIFEST) +CARGO_BUILD=$(CARGO) build $(CARGO_BUILD_ARGS) -CARGO_CLEAN=$(CARGO) clean $(CARGO_CLEAN_ARGS) $(CARGO_MANIFEST) +CARGO_CLEAN=$(CARGO) clean $(CARGO_CLEAN_ARGS) include Makefile.compiler @@ -106,7 +106,6 @@ else ROOT_SBINDIR?=$(PREFIX)/sbin INITRAMFS_DIR=/etc/initramfs-tools endif -LIBEXECDIR=$(PREFIX)/libexec PKGCONFIG_SERVICEDIR:=$(shell $(PKG_CONFIG) --variable=systemdsystemunitdir systemd) ifeq (,$(PKGCONFIG_SERVICEDIR)) @@ -173,10 +172,10 @@ OBJS:=$(SRCS:.c=.o) $(Q)$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< BCACHEFS_DEPS=libbcachefs.a -RUST_SRCS:=$(shell find rust-src/src rust-src/bch_bindgen/src -type f -iname '*.rs') +RUST_SRCS:=$(shell find src bch_bindgen/src -type f -iname '*.rs') bcachefs: $(BCACHEFS_DEPS) $(RUST_SRCS) - $(CARGO_BUILD) + $(Q)$(CARGO_BUILD) libbcachefs.a: $(filter-out ./tests/%.o, $(OBJS)) @echo " [AR] $@" @@ -201,7 +200,7 @@ cmd_version.o : .version install: INITRAMFS_HOOK=$(INITRAMFS_DIR)/hooks/bcachefs install: INITRAMFS_SCRIPT=$(INITRAMFS_DIR)/scripts/local-premount/bcachefs install: bcachefs $(optional_install) - $(INSTALL) -m0755 -D rust-src/target/release/bcachefs -t $(DESTDIR)$(ROOT_SBINDIR) + $(INSTALL) -m0755 -D target/release/bcachefs -t $(DESTDIR)$(ROOT_SBINDIR) $(INSTALL) -m0644 -D bcachefs.8 -t $(DESTDIR)$(PREFIX)/share/man/man8/ $(INSTALL) -m0755 -D initramfs/script $(DESTDIR)$(INITRAMFS_SCRIPT) $(INSTALL) -m0755 -D initramfs/hook $(DESTDIR)$(INITRAMFS_HOOK) @@ -215,6 +214,7 @@ install: bcachefs $(optional_install) sed -i '/^# Note: make install replaces/,$$d' $(DESTDIR)$(INITRAMFS_HOOK) echo "copy_exec $(ROOT_SBINDIR)/bcachefs /sbin/bcachefs" >> $(DESTDIR)$(INITRAMFS_HOOK) + echo "copy_exec $(ROOT_SBINDIR)/mount.bcachefs /sbin/mount.bcachefs" >> $(DESTDIR)$(INITRAMFS_HOOK) .PHONY: install_systemd install_systemd: $(systemd_services) $(systemd_libexecfiles) @@ -224,7 +224,7 @@ install_systemd: $(systemd_services) $(systemd_libexecfiles) .PHONY: clean clean: @echo "Cleaning all" - $(Q)$(RM) libbcachefs.a tests/test_helper .version *.tar.xz $(OBJS) $(DEPS) $(DOCGENERATED) + $(Q)$(RM) libbcachefs.a c_src/libbcachefs.a tests/test_helper .version *.tar.xz $(OBJS) $(DEPS) $(DOCGENERATED) $(Q)$(CARGO_CLEAN) $(Q)$(RM) -f $(built_scripts) @@ -244,8 +244,8 @@ doc: bcachefs-principles-of-operation.pdf .PHONY: cargo-update-msrv cargo-update-msrv: - cargo +nightly generate-lockfile --manifest-path rust-src/Cargo.toml -Zmsrv-policy - cargo +nightly generate-lockfile --manifest-path rust-src/bch_bindgen/Cargo.toml -Zmsrv-policy + cargo +nightly generate-lockfile -Zmsrv-policy + cargo +nightly generate-lockfile --manifest-path bch_bindgen/Cargo.toml -Zmsrv-policy .PHONY: update-bcachefs-sources update-bcachefs-sources: @@ -273,11 +273,20 @@ update-bcachefs-sources: git add include/linux/kmemleak.h cp $(LINUX_DIR)/lib/math/int_sqrt.c linux/ git add linux/int_sqrt.c - git rm -f libbcachefs/mean_and_variance_test.c -# cp $(LINUX_DIR)/lib/math/mean_and_variance.c linux/ -# git add linux/mean_and_variance.c -# cp $(LINUX_DIR)/include/linux/mean_and_variance.h include/linux/ -# git add include/linux/mean_and_variance.h + cp $(LINUX_DIR)/lib/math/mean_and_variance.c linux/ + git add linux/mean_and_variance.c + cp $(LINUX_DIR)/include/linux/mean_and_variance.h include/linux/ + git add include/linux/mean_and_variance.h + cp $(LINUX_DIR)/lib/time_stats.c linux/ + git add linux/time_stats.c + cp $(LINUX_DIR)/include/linux/time_stats.h include/linux/ + git add include/linux/time_stats.h + cp $(LINUX_DIR)/include/linux/darray.h include/linux/ + git add include/linux/darray.h + cp $(LINUX_DIR)/include/linux/darray_types.h include/linux/ + git add include/linux/darray_types.h + cp $(LINUX_DIR)/include/linux/eytzinger.h include/linux/ + git add include/linux/eytzinger.h cp $(LINUX_DIR)/scripts/Makefile.compiler ./ git add Makefile.compiler $(RM) libbcachefs/*.mod.c