Hello Dan, this time I tried to use smatch in nginx-1.25.4, as the configure file is in the /nginx-1.25.4, I ran ./configure first. The Makefile's content in the /nginx-1.25.4 is as follows: default: build clean: rm -rf Makefile objs .PHONY: default clean build: $(MAKE) -f objs/Makefile install: $(MAKE) -f objs/Makefile install modules: $(MAKE) -f objs/Makefile modules upgrade: /usr/local/nginx/sbin/nginx -t kill -USR2 `cat /usr/local/nginx/logs/nginx.pid` sleep 1 test -f /usr/local/nginx/logs/nginx.pid.oldbin kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin` .PHONY: build install modules upgrade It's a recursive makefile, so I tried : make CHECK="/home/lsc20011130/smatch/smatch /home/lsc20011130/CTestProj/nginx-1.25.4/objs --file-output" CC="/home/lsc20011130/smatch/cgcc"" but it doesn't work, the terminal just show me the right-pointing arrow, i think it's because it can't find the CC. Then, I just cd to the subdirectory /objs, tried to run make here. But it failed with: make: *** No rule to make target 'src/core/nginx.h', needed by 'objs/src/core/nginx.o'. Stop.It What should I do in this situation? regards, Lishu Chang > -----原始邮件----- > 发件人: "Dan Carpenter" <dan.carpenter@xxxxxxxxxx> > 发送时间: 2024-03-11 13:00:42 (星期一) > 收件人: "李书畅" <lishuchang@xxxxxxxxxxx> > 抄送: smatch@xxxxxxxxxxxxxxx > 主题: Re: Re: Re: Re: Re: Re: about using smatch in all debian C code > > On Sun, Mar 10, 2024 at 01:39:41PM +0800, 李书畅 wrote: > > I figure it out, I tried > > CHECK="/home/lsc20011130/smatch/smatch /home/lsc20011130/NtyCo/core" CC=/home/lsc20011130/smatch/cgcc make , and it works fine. > > > > I don't think you want to add the "/home/lsc20011130/NtyCo/core" part... > > But I'm happy that it's working. Don't hesitate to ask if you run into > more issues. > > regards, > dan carpenter
Attachment:
nginx-1.25.4.tar.gz
Description: GNU Zip compressed data