Page 2 of 2 <12
Topic Options
#142558 - 2005-07-05 10:47 AM Re: Premature termination of nested loginscripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
farter...
I still can't understand your makefile note.
and change to any subfile is handled by simple pretokenization of the main script.
no makefiles, no nothing.
you don't need to know what changed.

but, as said, you like it this way (and afaik, I bet you still don't totally get how the include works) so glad to hear it works for you.
_________________________
!

download KiXnet

Top
#142559 - 2005-07-05 12:17 PM Re: Premature termination of nested loginscripts
OldFart Offline
Fresh Scripter

Registered: 2005-06-28
Posts: 13
Loc: Marburg, Hessen, Germany
OK. Consider this structure:

file-1 contains
include file-x
include file-y

file-2 contains
include file-x
include file-z

file-3 contains
include file-y
include file-z

Pretokenize file-1, file-2, file-3. Fine. Your'e done for now.

Now then change something (to make things obvious: consider a constant named foobar) in file-y. Which ones of file-1, file-2, file-3 need a re-pretokenization to incorporate the change made in file-y ? What if you re-pretokenize file-1, but not file-3 ? Will they use the same value of foobar ? Will file-3 work or fail in probably strange manners, depending what foobar is used for ?

Multiply the number of includer files by 25 and the available possibly included files by 14 (both multipliers derived from my real-life numbers). You now have the idea of how difficult it can be to find the proper ones which need re-pretokenization.
Since the manual retrieval of affected files is error-prone, it should be automated. Finding these candidates is exactly what "make" was built for. The dependencies between files of a given project are defined in a makefile which "make" interpretes to trigger the necessary rebuild for affected includers. For obvious reasons the "makefile" looks very much like the structure expample I used at the start of this posting. The "makefile" *MUST ALWAYS* precisely reflect the includes occuring in the scriptfiles. Add a INCLUDE in a script and forget it to add in the "makefile" too ... and BOOM ... sooner or later you will experience problems.

Anyway, you proved my point. Since you find it difficult to understand the underlying relations and consequences I feel myself confirmed that this will be ununderstandable to others too ...

I think we should finish now, we are rapidly going offtopic.

Top
#142560 - 2005-07-05 01:25 PM Re: Premature termination of nested loginscripts
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, you say you don't call for scripts but some constant variables?
and that you use those constant variables accross your scripts and you change those constants as well.
well...
ok, think that is settled then.
I thought you used call to call other scripts and in that scenario include works just fine.
_________________________
!

download KiXnet

Top
Page 2 of 2 <12


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 483 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.048 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.