I want to make a Makefile so that nodejs is downloaded automatically if the user types makeupdate

Some thing like this.

install:
         echo 'installing node js'
         git clone git://github.com/ry/node.git
         cd node
         ./configure
         make
         sudo make install
         cd ..
         echo 'install npm'
         sudo curl -L  https://npmjs.org/install.sh | sh
         echo 'installing mocha, chai ... .'

Here is the version of makefile that should work for you,

install:
         echo 'installing node js'
         git clone git://github.com/ry/node.git
         cd node; \
         ./configure; \
         make; \
         sudo make install