Re: Trying to understand preprocessor
- Posted by moskito_x Feb 09, 2013
- 1396 views
That does not explain why "eui thedate.dex" does not work? without a pre-processor hook defined.
It's in the eu.cfg "-p dex:datesub.ex:-f %m/%d/%Y"
D:\euphoria-405\demo\preproc>eui thedate.dex Can't open 'D:\euphoria-405\demo\preproc\thedate.dex'
Are you sure the file was really there?
After such an Error, that's the first thing i'm looking for
Sorry typo: so was correct command: eui -p eui:datesub.ex thedate.eui
D:\euphoria-405\demo\preproc>eui -p eui:datesub.ex thedate.ex The date this was run is @DATE@
That wasn't suppose to work, as "-p eui" and ".ex" don't match.
I know that. I only want to show the complete test.
I catch the magic.
If I delete all "thedate.pp.* (cached files) I got the same error again.
The first command before the delete.
The second and third command after I delete all thedate.pp.xxx
Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. D:\euphoria-405\demo\preproc>eui -p eui:datesub.ex thedate.dex 2013-02-09 D:\euphoria-405\demo\preproc>eui -p eui:datesub.ex thedate.dex Can't open 'D:\euphoria-405\demo\preproc\thedate.dex' D:\euphoria-405\demo\preproc>eui thedate.dex Can't open 'D:\euphoria-405\demo\preproc\thedate.dex'
Test:
First command: It runs fine, and create a thedate.pp.dex
Second command: Now thedate.pp.dex exist and so eui thedate.dex runs fine.
D:\euphoria-405\demo\preproc>eui -p dex:datesub.ex thedate.dex 2013-02-09 D:\euphoria-405\demo\preproc>eui thedate.dex 2013-02-09
why is that?
That's because the command eui -p eui:datesub.ex thedate.dex
the eui: did not match the extension .dex
and now eui searches in eu.cfg for a match pre-processor line like -p dex:datesub.ex:-f %m/%d/%Y
and then created thedate.pp.dex-f the wrong file.
Solution
change in D:\euphoria-405\demo\preproc\eu.cfg the line
-p dex:datesub.ex:-f %m/%d/%Yto
-p dex:datesub.ex: %m/%d/%Y
moskito x