学习makefile文件编写,苦于没有好点的资料。

sh/bash/dash/ksh/zsh等Shell脚本
回复
mylusing
帖子: 3
注册时间: 2010-12-28 15:14

学习makefile文件编写,苦于没有好点的资料。

#1

帖子 mylusing » 2011-09-16 17:41

如题,谁那里有好点的资料,麻烦共享一下,网上的资料太草了。对还没有入门的人很有难度,请大家帮一下忙!
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 学习makefile文件编写,苦于没有好点的资料。

#2

帖子 eexpress » 2011-09-16 20:45

当成带不同入口的bash看。容易懂。

代码: 全选

● cat bin/cairo-weather/Makefile 
#!/usr/bin/make -f

clean:
	rm -rf deb

deb:	clean
	-mkdir -p deb/DEBIAN
	cp -u control deb/DEBIAN
	-mkdir -p deb/usr/bin
	-mkdir -p deb/usr/share/applications
	-mkdir -p deb/usr/share/cairo-weather
	-mkdir -p deb/usr/share/pixmaps
	cp -u *.desktop deb/usr/share/applications
	cp -ur *.pl config calendar/ weather-icon/ deb/usr/share/cairo-weather
	cp -u *.png deb/usr/share/pixmaps
	cd deb/usr/bin; \
	ln -sf ../share/cairo-weather/*.pl . ;\
	cd ../../..
	dpkg-deb -b deb .
某些命令前,需要加-而已。
当然,有好多环境变量可用。
● 鸣学
tusooa
帖子: 6548
注册时间: 2008-10-31 22:12
系统: 践兔
联系:

Re: 学习makefile文件编写,苦于没有好点的资料。

#3

帖子 tusooa » 2011-09-16 21:39

代码: 全选

] ls -ld //
回复