rewrite scripts
try to provide better syntax and avoid using bash
This commit is contained in:
43
debian/rules.d/Makefile.inc
vendored
43
debian/rules.d/Makefile.inc
vendored
@@ -10,10 +10,10 @@ CXX = $(CROSS_COMPILE)g++
|
||||
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
|
||||
CFLAGS := $(shell dpkg-buildflags --get CFLAGS) -Wall
|
||||
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) \
|
||||
-I$(top_srcdir)/$(OUTDIR) \
|
||||
-I$(top_srcdir)/debian/build/build-tools/$(OUTDIR) \
|
||||
-I$(top_srcdir)/scripts/include \
|
||||
-isystem $(top_srcdir)/debian/build/build-tools/include
|
||||
-I$(top_srcdir)/$(OUTDIR) \
|
||||
-I$(top_srcdir)/debian/build/build-tools/$(OUTDIR) \
|
||||
-I$(top_srcdir)/scripts/include \
|
||||
-isystem $(top_srcdir)/debian/build/build-tools/include
|
||||
CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -Wall
|
||||
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
|
||||
|
||||
@@ -24,11 +24,14 @@ clean: clean-recursive
|
||||
install: install-local install-recursive
|
||||
|
||||
%-recursive:
|
||||
+@list='$(SUBDIRS)'; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $* in $$subdir"; \
|
||||
mkdir -p $$subdir; \
|
||||
$(MAKE) -C $$subdir -f $(top_rulesdir)/$(OUTDIR)/$$subdir/Makefile OUTDIR=$(OUTDIR)/$$subdir $*; \
|
||||
+@list='$(SUBDIRS)' ; \
|
||||
for i in $$list ; do \
|
||||
echo "Making $* in $$i" ; \
|
||||
mkdir -p "$$i" ; \
|
||||
$(MAKE) -C "$$i" \
|
||||
-f $(top_rulesdir)/$(OUTDIR)/$$i/Makefile \
|
||||
OUTDIR=$(OUTDIR)/$$i \
|
||||
$* ; \
|
||||
done
|
||||
|
||||
all-local: $(PROGS)
|
||||
@@ -36,26 +39,26 @@ all-local: $(PROGS)
|
||||
install-local: install-local-progs install-local-scripts install-local-data
|
||||
|
||||
install-local-progs: $(PROGS)
|
||||
@for p in $^; do \
|
||||
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
|
||||
install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
|
||||
@for p in $^ ; do \
|
||||
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'" ; \
|
||||
install -D -m755 "$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \
|
||||
done
|
||||
|
||||
SCRIPTS_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(SCRIPTS)))
|
||||
|
||||
install-local-scripts: $(SCRIPTS_REAL)
|
||||
@for p in $^; do \
|
||||
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'"; \
|
||||
install -D -m755 \
|
||||
-s --strip-program $(top_srcdir)/debian/bin/fix-shebang \
|
||||
"$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
|
||||
@for p in $^ ; do \
|
||||
echo " install -m755 '$$p' '$(DESTDIR)/$(installdir)'" ; \
|
||||
install -D -m755 \
|
||||
-s --strip-program $(top_srcdir)/debian/bin/fix-shebang \
|
||||
"$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \
|
||||
done
|
||||
|
||||
DATA_REAL = $(wildcard $(addprefix $(top_srcdir)/$(OUTDIR)/,$(DATA)))
|
||||
|
||||
install-local-data: $(DATA_REAL)
|
||||
@for p in $^; do \
|
||||
echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'"; \
|
||||
install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename $$p)"; \
|
||||
@for p in $^ ; do \
|
||||
echo " install -m644 '$$p' '$(DESTDIR)/$(installdir)'" ; \
|
||||
install -D -m644 "$$p" "$(DESTDIR)/$(installdir)/$$(basename "$$p")" ; \
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user