shell script executed during building

Question

I use the following Makefile to install user scripts and prebuilt executables:

cat Makefile 
LOCAL_PATH := $(shell pwd)
APPS := $(shell find $(LOCAL_PATH) -type f -executable -printf "%f\n")

romfs:
	for app in $(APPS) ; do \
		$(ROMFSINST) -d $$app /bin/$$app; \
	done 

The binary files copied to romfs correctly, but the script got executed after copied.

Answer

config/romfsinst

             ${STRIPTOOL} ${dstfile} 2>/dev/null
             ${STRIPTOOL} -R .comment -R .note ${dstfile} 2>/dev/null

romfsinst was used for install elf binaries, so the strip action makes sense, but here the variable ${STRIPTOOL} was not assigned, thus results script got executed.

0%