From 3c86999734766d73b4baca4876b64f980ac47e5a Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 15 Nov 2022 13:05:50 +0100 Subject: [PATCH] buildsys: move package_template to defines.mk Signed-off-by: Wolfgang Bumiller --- Makefile | 11 ++--------- defines.mk | 8 ++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 defines.mk diff --git a/Makefile b/Makefile index ae2fa497..e296ec16 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +include defines.mk + CARGO ?= cargo ifeq ($(BUILD_MODE), release) @@ -7,15 +9,6 @@ else DEBUG_LIBPATH := "-L./target/debug", endif -define package_template - sed -r \ - -e 's/\{\{PRODUCT\}\}/$(1)/g;' \ - -e 's/\{\{LIBRARY\}\}/$(2)/g;' \ - -e 's|\{\{DEBUG_LIBPATH\}\}|$(DEBUG_LIBPATH)|g;' \ - Proxmox/Lib/template.pm \ - >Proxmox/Lib/$(1).pm -endef - define upload_template cd build; \ dcmd --deb lib$(1)-rs-perl*.changes \ diff --git a/defines.mk b/defines.mk new file mode 100644 index 00000000..fd389ca3 --- /dev/null +++ b/defines.mk @@ -0,0 +1,8 @@ +define package_template + sed -r \ + -e 's/\{\{PRODUCT\}\}/$(1)/g;' \ + -e 's/\{\{LIBRARY\}\}/$(2)/g;' \ + -e 's|\{\{DEBUG_LIBPATH\}\}|$(DEBUG_LIBPATH)|g;' \ + Proxmox/Lib/template.pm \ + >Proxmox/Lib/$(1).pm +endef