Makefile error make (e=2): The system cannot find the file specified

The error process_begin: CreateProcess(NULL, pscp blob.txt username@hostname:/folder/, …) failed. make (e=2): The system cannot find the file specified. is almost certainly complaining that Windows cannot find pscp. This is almost certainly because the value of %PATH% (or whatever) is different when make spawns a shell/console then when you have it open manually. Compare the values … Read more

Common GNU makefile directory path

You should be able to use the MAKEFILE_LIST variable, like this: # This must be the first line in Makefile.common TOP := $(dir $(firstword $(MAKEFILE_LIST))) From the documentation: As make reads various makefiles, including any obtained from the MAKEFILES variable, the command line, the default files, or from include directives, their names will be automatically … Read more

tar: file changed as we read it

I also encounter the tar messages “changed as we read it”. For me these message occurred when I was making tar file of Linux file system in bitbake build environment. This error was sporadic. For me this was not due to creating tar file from the same directory. I am assuming there is actually some … Read more

CFLAGS vs CPPFLAGS

The implicit make rule for compiling a C program is %.o:%.c $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< where the $() syntax expands the variables. As both CPPFLAGS and CFLAGS are used in the compiler call, which you use to define include paths is a matter of personal taste. For instance if foo.c is a … Read more