diff options
-rw-r--r-- | Makefile.config.in | 1 | ||||
-rw-r--r-- | Makefile.new | 1 | ||||
-rw-r--r-- | mk/programs.mk | 5 | ||||
-rw-r--r-- | src/bsdiff-4.3/Makefile.new | 13 |
4 files changed, 18 insertions, 2 deletions
diff --git a/Makefile.config.in b/Makefile.config.in index 48baa2889404..b9d9bd1c46f4 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -9,6 +9,7 @@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ bindir = @bindir@ +bsddiff_compat_include = @bsddiff_compat_include@ datadir = @datadir@ datarootdir = @datarootdir@ exec_prefix = @exec_prefix@ diff --git a/Makefile.new b/Makefile.new index ed090a1f4739..b3ff2fc1b4ef 100644 --- a/Makefile.new +++ b/Makefile.new @@ -10,6 +10,7 @@ SUBS = \ src/nix-env/Makefile.new \ src/nix-daemon/Makefile.new \ src/nix-log2xml/Makefile.new \ + src/bsdiff-4.3/Makefile.new \ corepkgs/Makefile.new GLOBAL_CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr diff --git a/mk/programs.mk b/mk/programs.mk index e26e9af7a394..48f95c60c981 100644 --- a/mk/programs.mk +++ b/mk/programs.mk @@ -13,7 +13,8 @@ programs_list := # # - $(1)_LDFLAGS: additional linker flags. # -# - bindir: the directory where the program will be installed. +# - $(1)_INSTALL_DIR: the directory where the program will be +# installed; defaults to $(bindir). define build-program = _d := $$($(1)_DIR) _srcs := $$(foreach src, $$($(1)_SOURCES), $$(_d)/$$(src)) @@ -24,7 +25,7 @@ define build-program = $$($(1)_PATH): $$($(1)_OBJS) $$(_libs) $(QUIET) $(CXX) -o $$@ $(GLOBAL_LDFLAGS) $$($(1)_OBJS) $$($(1)_LDFLAGS) $$(foreach lib, $$($(1)_LIBS), $$($$(lib)_LDFLAGS_USE)) - $(1)_INSTALL_DIR := $$(bindir) + $(1)_INSTALL_DIR ?= $$(bindir) $(1)_INSTALL_PATH := $$($(1)_INSTALL_DIR)/$(1) $$(eval $$(call create-dir,$$($(1)_INSTALL_DIR))) diff --git a/src/bsdiff-4.3/Makefile.new b/src/bsdiff-4.3/Makefile.new new file mode 100644 index 000000000000..a56f6c124db0 --- /dev/null +++ b/src/bsdiff-4.3/Makefile.new @@ -0,0 +1,13 @@ +PROGRAMS += bsdiff bspatch + +bsdiff_DIR := $(d) +bsdiff_SOURCES = bsdiff.c +bsdiff_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bsdiff_INSTALL_DIR = $(libexecdir) + +bspatch_DIR := $(d) +bspatch_SOURCES = bspatch.c +bspatch_LDFLAGS = -lbz2 $(bsddiff_compat_include) +bspatch_INSTALL_DIR = $(libexecdir) + +dist_files += $(d)/compat-include/* |