UBUNTU: [Packaging] debian/rules: 1-maintainer.mk -- Use make's if-else
Use make's built-in if-else conditional rather than the shell's so we can drop multi-line shell statements and make the code more readable. While at it, don't purge the 'build' directory at the end of the config operations. That's a directory used internally by the kernelconfig script which handles the cleanup. Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
59d9bce332
commit
00cc10f13f
Vendored
+20
-20
@@ -27,32 +27,32 @@ printdebian:
|
||||
|
||||
.PHONY: migrateconfigs
|
||||
migrateconfigs:
|
||||
dh_testdir;
|
||||
if [ -e "$(DEBIAN)/config/config.common.ubuntu" ]; then \
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig genconfigs; \
|
||||
mkdir build; \
|
||||
mv $(DEBIAN)/config/annotations build/.annotations ; \
|
||||
mv $(DEBIAN)/config/README.rst build/.README.rst 2>/dev/null || true; \
|
||||
rm -rf $(DEBIAN)/config; \
|
||||
mkdir -p $(DEBIAN)/config; \
|
||||
debian/scripts/misc/migrate-annotations < build/.annotations > $(DEBIAN)/config/annotations; \
|
||||
mv build/.README.rst $(DEBIAN)/config/README.rst 2>/dev/null || true; \
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig updateconfigs; \
|
||||
fi
|
||||
ifneq ($(wildcard $(DEBIAN)/config/config.common.ubuntu),)
|
||||
dh_testdir
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig genconfigs
|
||||
rm -rf build
|
||||
mkdir build
|
||||
mv $(DEBIAN)/config/annotations build/.annotations
|
||||
mv $(DEBIAN)/config/README.rst build/.README.rst 2>/dev/null || true
|
||||
rm -rf $(DEBIAN)/config
|
||||
mkdir -p $(DEBIAN)/config
|
||||
debian/scripts/misc/migrate-annotations < build/.annotations > $(DEBIAN)/config/annotations
|
||||
mv build/.README.rst $(DEBIAN)/config/README.rst 2>/dev/null || true
|
||||
rm -rf build
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/kernelconfig updateconfigs
|
||||
endif
|
||||
|
||||
configs-targets := updateconfigs defaultconfigs genconfigs editconfigs
|
||||
|
||||
.PHONY: $(configs-targets)
|
||||
$(configs-targets):
|
||||
dh_testdir;
|
||||
if [ -e "$(DEBIAN)/config/config.common.ubuntu" ]; then \
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig $@; \
|
||||
else \
|
||||
skip_checks=$(do_skip_checks) conc_level=$(conc_level) \
|
||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig $@; \
|
||||
fi;
|
||||
rm -rf build
|
||||
dh_testdir
|
||||
ifneq ($(wildcard $(DEBIAN)/config/config.common.ubuntu),)
|
||||
conc_level=$(conc_level) $(SHELL) $(DROOT)/scripts/misc/old-kernelconfig $@
|
||||
else
|
||||
skip_checks=$(do_skip_checks) conc_level=$(conc_level) \
|
||||
$(SHELL) $(DROOT)/scripts/misc/kernelconfig $@
|
||||
endif
|
||||
|
||||
.PHONY: printenv
|
||||
printenv:
|
||||
|
||||
Reference in New Issue
Block a user