Can GP handle imports in implementation part?
I can easily compile `tpyacc' using automake, but GP fails:
/pom/kompi/gcc/tst26/gp-0.55/gp PC='/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgpc' -B/pom/kompi/gcc/tst26/gpc7-3.4/gcc/ --no-default-paths -O3 lex.pas /pom/kompi/gcc/tst26/tt2/p1/tply41a/lexmsgs.pas:99: error: module/unit interface `LexBase' could not be imported
lexmsgs.gpd: GNU Pascal Preliminary Dependency File, Version 1 K 2 P x86_64-unknown-linux-gnu V 20040516, based on gcc-3.4.0 O -O3 g /pom/kompi/gcc/tst26/tt2/p1/tply41a/lexmsgs.gpi n 168 m 4a17330f6b72cfd7a579a267431ddc39 m 00000000000000000000000000000000 m 00000000000000000000000000000000 M
No mention of `lexbase.gpi'! In `lexmsgs.pas':
... implementation
uses LexBase; ...
By the way, I would mention `GPC_UNIT_PATH' as a Makefile variable. I had to use:
make CC=/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgcc PC="/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgpc" CFLAGS="-B/pom/kompi/gcc/tst26/gpc7-3.4/gcc/ -O2 -Wall" GPC_UNIT_PATH=/pom/kompi/gcc/tst26/gpc-20040516/p/units:/pom/kompi/gcc/tst26/gpc7-3.4/gcc/p/rts/
to compile using non-installed gpc.
Waldek Hebisch wrote:
Can GP handle imports in implementation part?
Yes.
I can easily compile `tpyacc' using automake, but GP fails:
/pom/kompi/gcc/tst26/gp-0.55/gp PC='/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgpc' -B/pom/kompi/gcc/tst26/gpc7-3.4/gcc/ --no-default-paths -O3 lex.pas /pom/kompi/gcc/tst26/tt2/p1/tply41a/lexmsgs.pas:99: error: module/unit interface `LexBase' could not be imported
No mention of `lexbase.gpi'! In `lexmsgs.pas':
... implementation
uses LexBase; ...
It's just a bug with '{' (brace in a string), will be fixed in the next release. (Isn't it ironic that a lexer program finds a bug in GP's lexer? ;-)
By the way, I would mention `GPC_UNIT_PATH' as a Makefile variable. I had to use:
make CC=/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgcc PC="/pom/kompi/gcc/tst26/gpc7-3.4/gcc/xgpc" CFLAGS="-B/pom/kompi/gcc/tst26/gpc7-3.4/gcc/ -O2 -Wall" GPC_UNIT_PATH=/pom/kompi/gcc/tst26/gpc-20040516/p/units:/pom/kompi/gcc/tst26/gpc7-3.4/gcc/p/rts/
to compile using non-installed gpc.
OK. (You mean just to mention it in the documentation, do you?)
(Actually, GPC_UNIT_PATH wasn't meant to be a user-accessible make variable, since GP currently isn't meant to be built with non installed GPCs -- when it will be integrated with the GPC build process, the makefile will be integrated as well, probably with the p/utils/Makefile. But I think it can't hurt to document the variable.)
Frank