解决 sourcenav 不能正常启动的问题
错误信息: Can’t find a usable init.tcl in the following directories
解决办法: 编辑snavigator这个程序,其实就是一个sh script
加一行 export LC_ALL=en_US
即可
错误信息: Can’t find a usable init.tcl in the following directories
解决办法: 编辑snavigator这个程序,其实就是一个sh script
加一行 export LC_ALL=en_US
即可
如果出现: Message: ROM: couldn’t open ROM image file ‘file=/usr/share/bochs/VGABIOS-lgpl-latest’.
那是因为 2.1.1 和2.2pre的配置文件格式不一样
把file=去掉就好了
以前写过一个blog是关于hack Makefile的,不过是2.4下。
现在需要在2.6的makefile里做同样的事
修改./scripts/Makefile.build
+CBD_S_cc_o_c = $(CC) $(c_flags) -S -o $*.s \
+ $(if $(filter-out /%,$<),$(srctree)/$<,$<)
%.o: %.c FORCE
$(call cmd,force_checksrc)
+ $(call CBD_S_cc_o_c)
$(call if_changed_rule,cc_o_c
即可
gcc -S
以前改的也存下档吧,省得找不到了
为了查汇编文件输出
Rule.make
…
[snip]
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -S $<
$(CC) $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -c -o $@ $<
[snip]
…
pkg_setup 必须先做的各种任务,检查配置文件啥的
pkg_nofetch 显示点信息告诉user不能自动下载的原因,比如license问题
src_unpack解包,打补钉,运行辅助程序
src_compile配置和编译
src_install安装
src_test只有设置了FEATURES=”maketest”并且不设置RESTRICT=”maketest”才执行
pkg_preinst在merging之前做的事
pkg_postinst在merging之后做的事
pkg_prerm在删除之前做的事
pkg_postrm在删除之后做的事
pkg_config You use this function to setup an initial configuration for the package after it’s installed. All paths in this function should be prefixed with ROOT. This function is only executed if and when the user runs: ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config.
helper functions
use检查use标志
has_version如果指定某个包有需要的版本返回1。
例如:has_version >=sys-libs/glibc-2.3.0
best_version返回指定包的版本
use_with如果指定标志被定义了返回–with-foobar反之返回–without-foobar
use_enable如果指定标志被定义了返回–enable-foobar反之返回–disable-foobar
check_KV检查kernel的版本号
keepdir用于在指定的目录下创建一个.keep文件,以免被自动清楚。永远不要自己建这个.keep,否则如果以后portage改变对keepdir的处理方法就不能自动处理这个portage了
econf传递额外的参数给./configure
einstall传递额外的参数给make命令,注意不提倡用einstall替换make install DESTDIR=${D}
die搞死当前的进程,最好告诉为什么
einfo提醒用户重要的事