DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T m

⟦b648e5e9d⟧ TextFile

    Length: 5482 (0x156a)
    Types: TextFile
    Names: »maketd.1l«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« 
        └─⟦ca79c7339⟧ 
            └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/maketd/maketd.1l« 

TextFile

.TH MAKETD 1L PUCC
.SH NAME
maketd \- make transitive dependencies
.SH SYNOPSIS
.B maketd
[ option ... ] file ...
.SH DESCRIPTION
.I maketd
computes dependencies for makefiles from sources introduced through
include files.
It generates lines like
\*(lqxx.o: e.h struct.h ../h/const.h ...\*(rq.
It makes xx.o not only dependent on all files it includes,
but also recursively on all files other files include.
This is achieved by passing the source through the C preprocessor
.RI ( /lib/cpp ).
.PP
The motivation for this program stems from the fact that make
does not recognize transitive dependencies.  For example,
given the following makefile fragment:
.nf

	xx.o:   e.h

	e.h:    struct.h ../h/const.h

.fi
changing
.I struct.h
will
.B not
trigger a recompilation of xx.o.
.PP
The directories used in the search for include files
are identical to the ones used by the C compiler, because the
C preprocessor is used.
This also means that `#define's, `#ifdef's, etc. are evaluated.
It may therefore be necessary to recompute the dependencies if
any source has been changed, including the associated makefile.
.PP
A typical application in a makefile might look like:
.nf

	INCL= \-I../include  \-I../h
	CFLAGS= \-DPUCC \-DBSD4_2 ${INCL}
	SRC= a.c b.c c.c

	maketd: ${SRC}
		maketd \-a ${CFLAGS} ${SRC}

	# DO NOT DELETE THIS LINE \- make depend DEPENDS ON IT

.fi
The generated dependencies will be inserted after the `# DO NOT DELETE...'
line.
Everything after this line will go away through the editing
process of the makefile.
If no such line exists, a line of the expected form will be emitted,
followed by the dependencies.
The default filename for the makefile is `makefile'.
If `makefile' does not exist, `Makefile' is used.
The
.BR \-m " and " \-d
options override this default action.
Before it is edited, the makefile will be saved in `Makefile.bak'
(overwriting any existing `Makefile.bak').
.PP
The following options are understood:
.TP
.BI \-4
Use 
.IR m4 ( 1 )
as the preprocessor rather than cpp.  This requires that modifications
have been made to m4 and that this program be compiled with CPP_M
defined.  Use maketd -h to check this.
.TP
.BI \-a
Normally, dependencies on files in `/usr/include' are
not included \- this option also includes dependencies on those files.
.TP
.BI \-b
Generate dependencies for binaries rather than object files.
This is equivalent to specifying a null suffix.
The `.o' is stripped from the filename.
.TP
.BI \-d
Instead of editing the makefile, dependencies are written to standard
output.
The standard header and trailer, `# DO NOT ...' are not emitted.
.TP
.BI \-e rule
Generate an explicit rule for each file.
The rules tell 
.I make
how to go about creating an object.
Rules are only generated for files ending with `.\^c'.
There may be several 
.B \-e
options in a single command line.
A 
.B \-e
option with no string will generate the default rule of the form:
.nf
.IP
	foo.o: ${I}/stdio.h foo.c
		cc \-c ${CFLAGS} foo.c
.fi
.IP
The 
.B \-e
options are taken left to right for rules to follow
each other on a new line.
The first rule line will have the first three instances of `%s'
replaced by the source name.
Following rule lines will have their first three instances of `%s'
replaced by the basename of the target.
Thus
.IP
	maketd\ \-s.w\ \ "\-ecc\ \-O\ \-c\ %s"\ \ "\-emv\ %s.o\ %s.w"\ \ foo.c
.IP
will generate
.nf
.IP
	foo.w: ${I}/stdio.h foo.c
		cc \-O \-c foo.c
		mv foo.o foo.w
.fi
.TP
.BI \-h
Print a usage summary and exit.
.TP
.BI \-k
Specify explicit rules required by stock 2.9 BSD kernel.
The action of this option can be accomplished with the 
.B \-e
option.
.TP
.BI \-m file
insert dependencies in
.I file
(instead of `makefile' or `Makefile').
.TP
.BI \-nonlocalo
Generate dependency paths that match the source paths given.
.TP
.BI \-o directory
Normally dependencies are of the form \*(lqa.o: ...\*(rq.
This option generates dependencies of the form
\*(lq\fIdirectory\fP/a.o: ...\*(rq,
which is useful for makefiles which store the objects in
a separate subdirectory.
The name of the directory must not be empty.
.TP
.BI \-q
Do not invoke
.I /lib/cpp 
with the
.B \-M
option.
This option aids in dependency generation, but may not
implemented in some versions of
.IR cpp .
Use of 
.B \-q
may cause
.I maketd
to use more resources, but there will be no difference in the
the generated dependencies.
.TP
.BI \-s suffix
Supply a suffix for the target.
The suffix should start with a `.'.
The target file name should have a suffix of some sort that
is delimited by a `.' that is replaced by this suffix.
.TP
.BI \-t target
Supply a new basename for the target.
.TP
.BI \-x
Don't shorten include files.
The default action is to replace `/usr/include' strings with `${I}'
and `/usr/include/sys' strings with `${S}'.
The makefile is scanned to see if the variables `I' and `S' are
set, and if not, strings are emitted to set them to these values.
.TP
.BI \-v
Be verbose.
Extra output is directed to
.I stderr.
.TP
.BI \-I dir
Specify a directory to search for include files.
See
.IR cc ( 1 )
for a complete description.
.TP
.BI \-D name=def
.br
.ns
.TP
.BI \-D name
Specify a preprocessor definition.  See
.I cc
for a complete description.
.TP
.BI \-U name
Remove any initial definition of the (preprocessor) variable
.IR name .
.SH AUTHOR
Stephan v. Bechtolsheim (the shell script), Purdue CS
.br
Stephen Uitti (the C version), PUCC
.br
Craig Norborg (m4 modifications), PUCC
.SH SEE ALSO
make(1), cc(1), m4(1)