Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Automatic dependency finding Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
RichardMitton

February 17, 2005, 03:45 PM

Aloha,

Sorry about the shameless plug, but I'd just like to draw some attention to a little utility I knocked up.

http://sham.sourceforge.net/

It's a small command you can prefix to any command line, and get automatic dependency checking. The command only gets executed if it's inputs have changed since last time.

If any of you guys get a chance to check it out, I'd appreciate any feedback y'all have.

Thanks :-)

 
Chad Austin

February 17, 2005, 05:55 PM

Heh, cute hack. Why not just use SCons or something?

 
El Pinto Grande

February 17, 2005, 08:50 PM

As far as gcc is concerned it's redundant as recent gcc can generate those dependencies on the fly while compiling; coupled with make...

%.o: %.cpp
@g++[some flags] -Wp,-MT,$@,-MMD,$(@:.o=.d) -c $< -o $@

-include $(OBJECTS:.o=.d)

.. we get, 3 lines later, instant automatic dependency checkings.

Voilą.

 
This thread contains 3 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.