O'Reilly logo

A Practical Guide to Linux® Commands, Editors, and Shell Programming, Third Edition by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Examples

The first example causes make to bring the target-file named analysis up-to-date by issuing three cc commands. It uses a makefile named GNUmakefile, makefile, or Makefile in the working directory.

$ make analysiscc -c analy.ccc -c stats.ccc -o analysis analy.o stats.o

The following example also updates analysis but uses a makefile named analysis.mk in the working directory:

$ make -f analysis.mk analysis'analysis' is up to date.

The next example lists the commands make would execute to bring the target-file named credit up-to-date. Because of the –n option, make does not execute the commands.

$ make -n creditcc -c -O credit.ccc -c -O accounts.ccc -c -O terms.ccc -o credit credit.c accounts.c terms.c

The next example uses the –t option ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required