read input variable in makefile and set variable upon it`s name

Each command runs in its own subshell, so variables can’t survive from one command to the next. Put them on the same line and they’ll work:

build:  
    @read -p "Enter Module Name:" module; \  
    module_dir=./modules/$$module; \
    mkdir -p $$module_dir/build

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)