makefile

来自「最新rtlinux内核源码」· 代码 · 共 57 行

TXT
57
字号
SOURCE:=$(shell (ls *.c))MODULES=$(shell for i in `ls *.c | awk -F. '{print $$1}' `; do echo $$i".o" ; done )MODNAMES=$(shell for i in `ls *.c | awk -F. '{print $$1}' `; do echo $$i; done )include ../../../../rtl.mkall: 	$(MAKE) $(MODULES)help:	@echo "/***************************************************************/"	@echo "/*  Open POSIX test suite addapted to RTLinux.                 */"	@echo "/***************************************************************/"	clean:	rm -f *.otest: all help	@echo "First we remove any existing rtl-modules"	@echo "You may see error warnings from \"make\" - ignore them"	@echo "Type <return> to continue"	@read junk	-(for i in $(MODNAMES) ; do rmmod $$i ; done)	 		(cd ../../../../; scripts/rmrtl)	@echo "Now insert the fifo and scheduler"	@echo "Type <return> to continue"	@read junk	(cd ../../../../; scripts/insrtl)	@echo "Now start the real-time test tasks modules"	@echo "Type <return> to continue"	@read junk	@dmesg -c	@tail -f /var/log/messages -n 0 &	(for i in $(MODNAMES) ; do \	echo ">------------------------------------------<" ; \	echo "          TESTING "$$i".o MODULE            " ; \	echo ">------------------------------------------<" ; \	cat $$i.c | awk '{ if ( $$1 == "*" ) print $0 }' ; \	insmod $$i.o; \	if [[ $$i == "5-3" ]]; then \	echo "Sleeping for 30 seconds" ; \	sleep 30 ; \	else \	echo "Sleeping for 5 seconds" ; \	sleep 5 ; \	fi; \	echo ">------------------------------------------<" ; \	echo "               TEST RESULTS:                " ; \	echo ">------------------------------------------<" ; \	dmesg -c ;\	rmmod $$i ; \	echo "Type <return> to continue" ; \	read junk ; \	 done)	@kill `pidof -s tail`include ../../../../Rules.make

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?