Roland Mainz wrote:
> Peter Memishian wrote:
[snip]
> > I understand your concern, but this one seems pretty safe. My worry is
> > that someone will cut-and-paste that ROOTDEMO* stuff into something else
> > and it will start to spread. I've seen this happen many times and I'd
> > like to not repeat that mistake again.
>
> 1. I did a small test... problem is that the logic isn't really that
> generic.
> -- snip --
> $(ROOTDEMODIRS) := OWNER = root
> $(ROOTDEMODIRS) := GROUP = bin
> $(ROOTDEMODIRS) := DIRMODE = 755
>
> .PARALLEL: $(ROOTDEMOFILES)
>
> install: \
> $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES)
>
> $(ROOTDEMODIRS):
> $(INS.dir)
>
> $(ROOTDEMODIRBASE)/%: common/%
> $(INS.file)
> -- snip --
>
> >From this code only ROOTDEMODIRS is completely generic - the mode
> settings in the first three lines may be (AFAIK) subject for custom
> values and ROOTDEMODIRBASE depends on the demo source sitting in
> "common/". This could be customized by "yet another variable"
> ("ROOTDEMOSRCDIR", which defaults to "common/") - but at that point I am
> wondering whether this is overengineering or not.
>
> 2. Is there any recommendation what I should do when the consumer
> Makefiles of Makefile.lib do not have any demo files ? If ROOTDEMODIRS,
> ROOTDEMOFILES, ROOTDEMODIRBASE aren't defined AFAIK all hell will break
> loose - which means we need some kind of "dummy" values. Are there any
> recommendations what could be done in such a case (ROOTDEMODIRBASE could
> default to $(ROOT)/usr/demo/$(LIBNAME/) but the correct/recommended
> dummy value for ROOTDEMODIRS generates some headaches for me (or I am
> awake too long today... ;-()) ?
Grumpf... would it be possible to split the "demo" rules in a seperate
file, e.g. usr/src/Makefile.demorules ?
The advatages would be:
- The additional rules would not bloat the rule/variable lists in all
Makefiles, only the subprojects which actually have demo files would use
these extra rules
- We wouldn't need any dummy values for subprojects which do not use the
demo rules (again less spam and less "AEM"s (="anti engineer mines")
floating around in the Makefiles)
- The risk of this change would be limited to the consumers and not
generate any tree-wide side-effects (originally I hoped the putback
would be almost "risk free" but that goal already drowned a while ago...
;-( )
Disadvantage:
- Yet another Makefile include
- <insert-more-disavantages-here>
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) [EMAIL PROTECTED]
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 7950090
(;O/ \/ \O;)
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code