1
我想一些幫助,下面的問題:品牌:從工作目錄名(Debian軟件包規則)中提取了一些
我有一個快速啓動的食譜提供每日內置Debian軟件包。版本名稱(和源目錄的名稱)會自動生成幷包含當前的修訂版本號。我想修改debian/rules文件來提取修訂號並將其傳遞給CMake。
到目前爲止它不起作用 - 它似乎是一個空字符串傳遞給CMake。我不知道問題出在我的代碼或其他東西上。
規則文件:
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh [email protected] --parallel --list-missing
# Try to detect the Bazaar revision number from the directory name
ifneq ($(findstring bzr,$(PWD)),)
COMPONENTS := $(PWD)
COMPONENTSL := $(subst -,' ',COMPONENTS)
COMPONENTSLL := $(subst ~,' ',COMPONENTSL)
BZRVER := $(filter bzr%,COMPONENTSLL)
BZRVERN := $(subst bzr,,$(BZRVER))
override_dh_auto_configure:
dh_auto_configure -- -DRELEASE_BUILD=0 -DBZR_REVISION=$(BZRVERN)
endif
生成日誌的有關章節:
make[1]: Entering directory `/build/buildd/stellarium-0.11.2~bzr5066'
dh_auto_configure -- -DRELEASE_BUILD=0 -DBZR_REVISION=
mkdir -p obj-i686-linux-gnu
cd obj-i686-linux-gnu
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DRELEASE_BUILD=0 -DBZR_REVISION=
任何想法?
侮辱明顯,不是嗎? :) – Daggerstab
除此之外,在空格周圍使用單引號會將它們和結果字符串中的空格一起插入。 – Daggerstab
是的,你是對的;) –