Language Make
| Date: | 04/20/05 |
| Author: | Andrew Dunstan |
| URL: | n/a |
| Comments: | 4 |
| Info: | n/a |
| Score: |
make is technically a tool for building applications, but it's
amazing what a pre-processor and recursion can do for you.
#
#
# quick effort at 99 bottles program using gnu make
#
# the file must be called makefile.bottles
#
# Author: Andrew Dunstan (andrew.dunstan@its.maynick.com.au)
#
default:
$(MAKE) -f makefile.bottles BOTTLES=99 bottles
.SILENT:
bottles:
echo $(BOTTLES) bottles of beer on the wall
echo $(BOTTLES) of beer
echo Take one down and pass it around
ifeq ($(BOTTLES),0)
echo No bottles of beer on the wall
else
echo `expr $(BOTTLES) - 1` bottles of beer on the wall
echo
$(MAKE) -f makefile.bottles BOTTLES=`expr $(BOTTLES) - 1` bottles
endif
Download Source | Write Comment
Alternative Versions
| Version | Author | Date | Comments | Rate |
|---|---|---|---|---|
| make syntax,portable,simple,dependencies | rahul | 03/17/08 | 0 |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
http://www.99-bottles-of-beer.net/language-gnu-make-1097.html