Re: make depend (Re: Coming attractions: VPATH build; make variables issue)

From: Brook Milligan <brook(at)biology(dot)nmsu(dot)edu>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org
Subject: Re: make depend (Re: Coming attractions: VPATH build; make variables issue)
Date: 2000-10-20 14:18:32
Message-ID: 200010201418.IAA03618@biology.nmsu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> What we could do is ship the dependencies (.deps/*.P) in the tarball.
> That would require running an entire build before making a tarball, but it
> would be a nice service to users.

Hm. It might be handy for people not using gcc, since they'd have no
easy way to build dependencies for themselves. Do you have an idea
how much it'd bloat the tarball to do that?

Isn't the basic idea to write Makefile targets to remake dependency
files when they are out of date with code? Won't those targets
involve implicit rules for going, for example, from *.c -> *.d (or
whatever convention you use for dependency files)? Don't these
Makefiles also have a list of srcs to be built, e.g., a make variable
that defines a list of *.c filename?

If so, can't you just implement a depend: target as

${DEPEND_FILES}+=${SRCS:%c=%d}
depend: ${DEPEND_FILES}
.SUFFIXES: .c .d
.c.d:
gcc -M ...
.include "${DEPEND_FILES}"

For gmake users, all the magic happens automatically. Prior to
distribution, just do make depend to get all the *.d files to include
in the tarball. For non-gmake users, all the *.d files already exist
in the source. If they make changes, they can run make depend
manually.

Sorry if this is what you had in mind already, but the discussion
seemed to imply that you can't have it both ways.

Cheers,
Brook

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-10-20 14:21:06 Re: Re: pg_dump docs
Previous Message Pete Forman 2000-10-20 13:04:16 Re: Add support for <xti.h>