Ticket #662 (closed patch: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] Add more dependencies on parrot.h

Reported by: doughera Owned by:
Priority: normal Milestone:
Component: none Version: 1.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

This patch adds a bunch of missing dependencies to the root Makefile. It's still incomplete, but it's slightly less incomplete.

An automated dependency generator would be helpful here. Failing that, folks with gcc could run something like gcc -MM and add in the missing dependencies.

Attachments

dependencies.patch Download (4.5 KB) - added by doughera 13 years ago.

Change History

Changed 13 years ago by doughera

in reply to: ↑ description ; follow-up: ↓ 3   Changed 13 years ago by jkeenan

Replying to doughera:

Failing that, folks with gcc could run something like gcc -MM and add in the missing dependencies.

At what point in the build process would someone run gcc -MM?

  Changed 13 years ago by coke

Patch applied.

Any kind of make-depend step here would be most appreciated. I suspect that we'd have to roll our own, since we have generated C code depending on perl scripts, depending on modules, depending on parrot...

But in the meantime, just verifying that all our C deps are there would be great. =-)

in reply to: ↑ 1   Changed 13 years ago by doughera

Replying to jkeenan:

At what point in the build process would someone run gcc -MM?

I suppose that *after* a full 'make' is probably most sensible. That way, all the auto-generated C files will have been generated. (Or at least all those appropriate for your platform.) I can't think of a simple one-line command to get them all because Parrot's build structure spans several directories, some of which have their own separate Makefile, and some of which don't. Still, something vaguely like this (off the top of my head, completely untested, quite possibly completely wrong) might work on Unix:

for f in `find src compilers/imcc -name '*.c' -print | sort`; do
    target=`echo $f | sed -e 's!\.c$!$(O)!'`
    gcc -Iinclude -MM -MT $target $f
done | sed -e 's!include/parrot!$(INC_DIR)!g'  >> config/gen/makefiles/root.in

  Changed 12 years ago by coke

See tools/dev/checkdepend.pl

  Changed 12 years ago by doughera

  • status changed from new to closed
  • resolution set to fixed
  • patch set to applied

The original patch included here has been applied. The more general problem of generating dependencies correctly is also discussed in TT #893. I'm closing this ticket in favor of that one.

Note: See TracTickets for help on using tickets.