Thank you for the explanation and workaround tip. So far I did not see any ordering issues. I was just curious how nmake handle recursive build and how transitive dependency works.
As per my ex-coworker transitive dependency was broke in the old Makerules.mk file, he added rules to our global rules file to address issues. He also mentioned that later version of nmake was fixed in the C code and run much faster. If that the case I would like to remove our workaround. Do you know which release have fixed base rules file? Thanks Sang -----Original Message----- From: Glenn Fowler [mailto:[email protected]] Sent: Tuesday, May 05, 2009 6:07 PM To: [email protected]; [email protected]; Lee, Sang Subject: RE: [ast-users] How nmake figure out implicit library dependency? On Tue, 5 May 2009 17:33:59 -0400 Lee, Sang wrote: > Hi Mr. Fowler, > > Thank you for the explanation. > The nmake documentation > http://www.research.att.com/~gsf/nmake/nmake.html state that :NMAKE: > operator determines the build order for all subdirectories for recursive > nmake build. > How nmake determines subdirectory build order include library > dependency. first, Mr. Fowler is my dad thanks, I forgot to mention inter-makefile library dependencies that is done by :MAKE: operator it scans makefiles in the directory hierarchy under the current makefile for -l* prerequisites if any -l* prerequisite is a target in a makefile in the hierarchy then it is added to a partial ordering of all library/makefile prerequisites pairs after all makefiles have been scanned the partial order is used to determine the makefile order, including those that can run concurrently if the ordering determined by :MAKE: is incorrect 1) send a note to this list because it may be a bug 2) you can workaround by this assertion near the top of the makefile :PACKAGE: foo:force this will force the "foo" makefile to be built before the current makefile follow these naming conventions to avoid mis-ordering: src/cmd/* # commands src/cmd/*lib/* # plugins src/lib/* # libraries the ast-open Makefiles use :force in only two places: cmd/nmake/Makefile::PACKAGE: ast cpp:force --clobber=!(nmake) a command::command dependency (nmake requires cpp) these are not detected by the :MAKE: scan lib/libtk/Makefile::PACKAGE: - X11 tcl:install ast libtksh:force -ltk requires headers installed as a side effect of installing -ltksh also not detected by the :MAKE: scan -- Glenn THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM DISCLOSURE. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this message and any attachment is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and permanently delete it from your computer and destroy any printout thereof. _______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
