rewrite scripts
try to provide better syntax and avoid using bash
This commit is contained in:
19
debian/rules.d/tools/objtool/Makefile
vendored
19
debian/rules.d/tools/objtool/Makefile
vendored
@@ -11,13 +11,18 @@ objtool.real-%:
|
||||
# these on the command line to make cross-builds work. But it also
|
||||
# builds fixdep which still needs to be native in a cross-build. Set
|
||||
# REALHOSTCC and REALHOSTLD variables which will be used for fixdep.
|
||||
$(MAKE) -C $(top_srcdir)/tools/objtool O=$(CURDIR)/$* \
|
||||
HOSTARCH=$(KERNEL_ARCH) ARCH=$* \
|
||||
HOSTCC=$(CC) KBUILD_HOSTCFLAGS='$(CFLAGS) $(CPPFLAGS)' \
|
||||
HOSTLD=$(CROSS_COMPILE)ld KBUILD_HOSTLDFLAGS='$(LDFLAGS)' \
|
||||
HOSTAR=$(CROSS_COMPILE)ar \
|
||||
REALHOSTCC=gcc REALHOSTLD=ld \
|
||||
V=1
|
||||
$(MAKE) -C $(top_srcdir)/tools/objtool \
|
||||
O=$(CURDIR)/$* \
|
||||
HOSTARCH=$(KERNEL_ARCH) \
|
||||
ARCH=$* \
|
||||
HOSTCC=$(CC) \
|
||||
KBUILD_HOSTCFLAGS='$(CFLAGS) $(CPPFLAGS)' \
|
||||
HOSTLD=$(CROSS_COMPILE)ld \
|
||||
KBUILD_HOSTLDFLAGS='$(LDFLAGS)' \
|
||||
HOSTAR=$(CROSS_COMPILE)ar \
|
||||
REALHOSTCC=gcc \
|
||||
REALHOSTLD=ld \
|
||||
V=1
|
||||
ln -f $*/objtool $@
|
||||
|
||||
%: %.o
|
||||
|
12
debian/rules.d/tools/perf/Makefile
vendored
12
debian/rules.d/tools/perf/Makefile
vendored
@@ -50,11 +50,11 @@ all:
|
||||
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf -f Makefile.perf all DESTDIR=dummy
|
||||
+$(MAKE_PERF) -C $(top_srcdir)/tools/perf/Documentation man
|
||||
# Check that perf didn't get linked against incompatibly-licensed libraries
|
||||
@if readelf -d $(CURDIR)/perf | sed -rne 's/.*NEEDED.*\[(.*)\]/\1/p' | grep -E '\blib(bfd|crypto)'; then \
|
||||
echo; \
|
||||
echo 'perf linked against incompatibly-licensed libraries'; \
|
||||
echo; \
|
||||
exit 1; \
|
||||
@if readelf -d $(CURDIR)/perf | sed -rne 's/.*NEEDED.*\[(.*)\]/\1/p' | grep -E '\blib(bfd|crypto)' ; then \
|
||||
echo ; \
|
||||
echo 'perf linked against incompatibly-licensed libraries' ; \
|
||||
echo ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
# Check that it links against abi::__cxa_demangle from libstdc++
|
||||
grep __cxa_demangle $(CURDIR)/perf
|
||||
@@ -70,5 +70,5 @@ install:
|
||||
rm -f $(DESTDIR)/usr/bin/trace
|
||||
mkdir -p $(DESTDIR)/usr/share/bash-completion/
|
||||
mv $(DESTDIR)/etc/bash_completion.d \
|
||||
$(DESTDIR)/usr/share/bash-completion/completions
|
||||
$(DESTDIR)/usr/share/bash-completion/completions
|
||||
rmdir --ignore-fail-on-non-empty $(DESTDIR)/etc
|
||||
|
8
debian/rules.d/tools/power/cpupower/Makefile
vendored
8
debian/rules.d/tools/power/cpupower/Makefile
vendored
@@ -1,6 +1,6 @@
|
||||
include $(top_rulesdir)/Makefile.inc
|
||||
|
||||
MAKE_CPUPOWER := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) O=$(CURDIR) CPUFREQ_BENCH=false V=true mandir=/usr/share/man
|
||||
MAKE_CPUPOWER := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) -C $(top_srcdir)/tools/power/cpupower O=$(CURDIR) CPUFREQ_BENCH=false V=true mandir=/usr/share/man
|
||||
|
||||
MAKE_CPUPOWER += DEBUG=$(if $(filter noopt,$(DEB_BUILD_OPTIONS)),true,)
|
||||
|
||||
@@ -12,10 +12,10 @@ MAKE_CPUPOWER += CROSS='$(CROSS_COMPILE)'
|
||||
MAKE_CPUPOWER += libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
|
||||
|
||||
all:
|
||||
+$(MAKE_CPUPOWER) -C $(top_srcdir)/tools/power/cpupower
|
||||
+$(MAKE_CPUPOWER)
|
||||
|
||||
install:
|
||||
+$(MAKE_CPUPOWER) -C $(top_srcdir)/tools/power/cpupower install DESTDIR=$(DESTDIR)
|
||||
+$(MAKE_CPUPOWER) install DESTDIR=$(DESTDIR)
|
||||
|
||||
clean:
|
||||
+$(MAKE_CPUPOWER) -C $(top_srcdir)/tools/power/cpupower clean
|
||||
+$(MAKE_CPUPOWER) clean
|
||||
|
@@ -1,15 +1,15 @@
|
||||
include $(top_rulesdir)/Makefile.inc
|
||||
|
||||
# Intel Speed Select Tool (ISST)
|
||||
MAKE_ISST := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) O=$(CURDIR)
|
||||
MAKE_ISST := CFLAGS='$(CFLAGS) $(CPPFLAGS)' LDFLAGS='$(LDFLAGS)' $(MAKE) -C $(top_srcdir)/tools/power/x86/intel-speed-select O=$(CURDIR)
|
||||
|
||||
MAKE_ISST += bindir=/usr/sbin V=1
|
||||
|
||||
all:
|
||||
$(MAKE_ISST) -C $(top_srcdir)/tools/power/x86/intel-speed-select
|
||||
$(MAKE_ISST)
|
||||
|
||||
install:
|
||||
$(MAKE_ISST) -C $(top_srcdir)/tools/power/x86/intel-speed-select install DESTDIR=$(DESTDIR)
|
||||
$(MAKE_ISST) install DESTDIR=$(DESTDIR)
|
||||
|
||||
clean:
|
||||
$(MAKE_ISST) -C $(top_srcdir)/tools/power/x86/intel-speed-select clean
|
||||
$(MAKE_ISST) clean
|
||||
|
@@ -4,6 +4,9 @@ installdir = /usr/sbin
|
||||
|
||||
include $(top_rulesdir)/Makefile.inc
|
||||
|
||||
CPPFLAGS += -I"$(top_srcdir)/tools/include" -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"' -DINTEL_FAMILY_HEADER='"$(top_srcdir)/arch/x86/include/asm/intel-family.h"' -DBUILD_BUG_HEADER='"$(top_srcdir)/include/linux/build_bug.h"'
|
||||
CPPFLAGS += -I$(top_srcdir)/tools/include
|
||||
CPPFLAGS += -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"'
|
||||
CPPFLAGS += -DINTEL_FAMILY_HEADER='"$(top_srcdir)/arch/x86/include/asm/intel-family.h"'
|
||||
CPPFLAGS += -DBUILD_BUG_HEADER='"$(top_srcdir)/include/linux/build_bug.h"'
|
||||
|
||||
LDLIBS += -lcap -lrt
|
||||
|
@@ -4,4 +4,5 @@ installdir = /usr/sbin
|
||||
|
||||
include $(top_rulesdir)/Makefile.inc
|
||||
|
||||
CPPFLAGS += -I"$(top_srcdir)/tools/include" -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"'
|
||||
CPPFLAGS += -I$(top_srcdir)/tools/include
|
||||
CPPFLAGS += -DMSRHEADER='"$(top_srcdir)/arch/x86/include/asm/msr-index.h"'
|
||||
|
20
debian/rules.d/tools/usb/usbip/Makefile
vendored
20
debian/rules.d/tools/usb/usbip/Makefile
vendored
@@ -5,20 +5,22 @@ srcdir := $(top_srcdir)/tools/usb/usbip
|
||||
# sub-make command line.
|
||||
unexport MAKEFLAGS
|
||||
|
||||
all: export CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
|
||||
all: export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \
|
||||
-isystem $(top_srcdir)/debian/build/build-tools/include
|
||||
CPPFLAGS_COMMON := -Wno-error=address-of-packed-member
|
||||
|
||||
all: export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS_COMMON)
|
||||
all: export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) $(CPPFLAGS_COMMON) \
|
||||
-isystem $(top_srcdir)/debian/build/build-tools/include
|
||||
all: export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
|
||||
all:
|
||||
rsync -a $(srcdir)/ .
|
||||
./autogen.sh
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--with-tcp-wrappers \
|
||||
--with-usbids-dir=/usr/share/misc \
|
||||
--disable-shared \
|
||||
--disable-static \
|
||||
--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
--prefix=/usr \
|
||||
--with-tcp-wrappers \
|
||||
--with-usbids-dir=/usr/share/misc \
|
||||
--disable-shared \
|
||||
--disable-static \
|
||||
--host=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
$(MAKE) V=1
|
||||
|
||||
install:
|
||||
|
Reference in New Issue
Block a user