jis@mtgzx.att.com (J Mukerji) (09/25/90)
I am trying to add a few directories to the andrew source tree to place locally developed stuff into. Ideally I would like to have these directories integrated in such a way that doing a "make World" at the top level will build these directories too. I noticed that there is a macro called EXTRASUBDIRS that can be used to specify additional subdirectories to build at the root. So I setup my additional subdirectories with appropriate Imakefiles and all, and then added the following lines to config/site.mcr: #ifdef MK_LOCAL LOCAL = local #endif /* MK_LOCAL */ #ifdef MK_SDA SDA = sda #endif /* MK_SDA */ EXTRASUBDIRS = $(LOCAL) $(SDA) and added the following lines to config/site.h: #define MK_LOCAL #define MK_SDA And cranked up the imake command as specified in the README.ez file to make me a Makefile at the root. When I took a peek at the Makefile thus created I was disappointed to find that while the rules for MakeSubdirs, DependMakeSubdirs, CleanSubdirs, TidySubdirs, TagsSubdirs, and MakefileSubdirs contained EXTRASUBDIRS, the rules for dependInstallClean, InstallSubdirs, InstallDocSubdirs, InstallAliasSubdirs, DependInstallSubdirs, and WorldInstallSubdirs do not contain EXTRASUBDIRS. This of course makes it very inconvenient for me to use EXTRASUBDIRS to do what I wanted to do. Now I have one of two alternatives: (i) Hack the root level Imakefile to do what I want to do. (ii) Change imake.tmpl to add EXTRASUBDIRS to the rules that are missing them. My question is what course does the collective wisdom of info-andrew suggest that I take. For the time being I have changed imake.tmpl since that seemed to be simpler to do than the other alternative. However, since I do not know the rationale behind the way imake.tmpl was originally setup, I do not know whether what I did is right or not. So I look for the guidance of Andrew experts. BTW I have built Andrew PL6 using my modified imake.tmpl and it builds and installs fine, including the local stuff. Thanks. Jishnu Mukerji, jis@mtgzx.att.com, +1 201 957 5986, AT&T Bell Laboratories, MT 3K-423, 200 Laurel Ave., Middletown NJ 07748
Craig_Everhart@TRANSARC.COM (09/25/90)
The EXTRASUBDIRS variable is indeed meant for directories in which some recursion, but not all recursion, is supposed to occur. That is, directories listed in EXTRASUBDIRS are supposed to have Makefile's generated for them, and are supposed to be Clean'ed, but are not supposed to be built. This is the mechanism by which, say, the overhead/pobbconf Makefile is built, so the installation of that directory then awaits the AMDS installer setting it up. Thus, adding the EXTRASUBDIRS to the rules not currently using them is asking for trouble. Every Imakefile could have an EXTRASUBDIRS variable. Defining that variable in site.mcr is really asking for trouble. That is, the way you tried setting it up, every directory that contains subdirectories would try to build Makefiles in its non-existent ``local'' and ``sda'' subdirectories. Unfortunately, the Andrew distribution doesn't have what you would really like, which would be some customer-dependent subdirectory in which local applications could be housed. You have to ask where it would go, though; perhaps after ``andrew/contrib'' could come ``andrew/site''. Maybe some Imakefile wizard would want to patch that into existence, and then never patch anything under andrew/site again (roughly the way the site.h and site.mcr files exist now). All the site-local changes could go under the andrew/site tree. How does that sound? Craig
jis@mtgzx.att.com (J Mukerji) (09/25/90)
Excerpts from info-andrew: 24-Sep-90 Re: imake.tmpl question Craig_Everhart@transarc. (1404+0) > Thus, adding the EXTRASUBDIRS to the rules not currently using them is > asking for trouble. > Every Imakefile could have an EXTRASUBDIRS variable. Defining that > variable in site.mcr is really asking for trouble. That is, the way you > tried setting it up, every directory that contains subdirectories would > try to build Makefiles in its non-existent ``local'' and ``sda'' > subdirectories. I came to that realization soon after the first build using that setup. > Unfortunately, the Andrew distribution doesn't have what you would > really like, which would be some customer-dependent subdirectory in > which local applications could be housed. You have to ask where it > would go, though; perhaps after ``andrew/contrib'' could come > ``andrew/site''. Maybe some Imakefile wizard would want to patch that > into existence, and then never patch anything under andrew/site again > (roughly the way the site.h and site.mcr files exist now). All the > site-local changes could go under the andrew/site tree. > How does that sound? I am in the process of putting in the change as you suggest in the top level Imakefile. I would be glad to submit a patch to it if so desired by the Andrew community. Thanks for your suggestion and comment. Jishnu Mukerji, jis@mtgzx.att.com, +1 201 957 5986, AT&T Bell Laboratories, MT 3K-423, 200 Laurel Ave., Middletown NJ 07748