# # This is a framework that allows a standard shell script # to be executed by simply typing "make". The script must # be named "Makefile" or "makefile", so your make binary # will find it. # # Note: If your script needs to read something from the # terminal, you have to redirect from /dev/tty (see the # example below). That's because stdin is the script itself. # # Tested with BSD make (pmake) and GNU make (gmake). # Does NOT work with Solaris make and other dumb makes. # # Oliver Fromme # all: @sed '1,/^\.ifdef/d' Makefile | sh ifdef notdef:foo # For gmake (GNU). .ifdef notdef # For make / pmake (BSD). ############################################## ###### ###### ###### The main script starts here. ###### ###### ###### ############################################## echo 'WARNING -- This will delete all data and kill your cat!!!' printf 'Do you really want to continue (y/n)? ' read ANSWER