Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
From: Frank Heckenbach
Subject: Hi everyone - got a question about GPC
Date: 18 Feb 2010, 07:48:00
Rugxulo wrote: > On Tue, Feb 16, 2010 at 11:45 AM, Maurice Lombardi > <Maurice.Lombardi@ujf-grenoble.fr> wrote: > > > > In fact for that reason, in my personal works I always use the option -o > > blah.exe. Well, GPC actually appends TARGET_EXECUTABLE_SUFFIX which can be set by the backend target specification. I assume it's not set in the DJGPP backend, but I don't know why. Historically it was because there was reason for the COFF file; if that's no more the case, it could have been set by default, AFAICS. (That would be a matter for the GCC developers, in particular for the DJGPP backend.) If you want to hack it yourself, you can probably just insert something like #ifdef __DJGPP__ #define TARGET_EXECUTABLE_SUFFIX ".exe" #endif near the start of p/module.c and rebuild GPC (untested). > > This causes no extra typing because I work in an editor able to > > launch a compiler with a single click through a script like > > > > #! /bin/sh > > echo $MSYSTEM > > gp $(basename "$1" | tr [A-Z] [a-z]) \ > > -o $(basename "$1" | sed -e 's/\(.*\)\.[^.]*$/\1\.exe/') \ > > $2 -march=prescott \ > > --unit-path=. --unit-path=c:/lombardi/$MSYSTEM/gpc/pascal_u \ > > --unit-path=c:/$MSYSTEM/units \ > > --unit-destination-path=c:/lombardi/$MSYSTEM/o \ > > `head -n 1 "$1" | sed -e '/^[^"]*$/d;s/^[^"]*"//;s/"[^"]*$//'` \ > > 2>&1 | sed ':1;s,/[^/.][^/]*/\.\./,/,;t 1' > > > > Whew! Perl, where are you when we need you? :-) Anyways, you could > probably also use sed instead of tr and head; that would be cleaner, > IMHO. But I'm not very *nix savvy, so who cares. ;-) Unix says, the right tool for the job. Why use perl when awk will do, or awk when sed will do, or sed when tr or grep will do (at least that's my principle) ... > For the record, I was unable to figure out compilation from within > PENG. Besides, it (DOS version) whines upon startup in NT (Vista), > something about printer or something silly like that. Since PENG is slightly OT here, I'll keep my answer short. For more discussion, please PM (f.heckenbach@fh-soft.de) or the PENG mailing list (see http://fjf.gnu.de/peng/ under "Contact"). PENG should support GPC compilation, ideally simply by pressing F9. Options can be set under "Options/Pascal". "Options/Pascal/Show sample GPC command line" will show what it will actually use. If you don't get along with this, you can also enter a command under "Options/Try a tool" (using the current file name as "$EDNAME", appyling file name functions etc., see the online help), and if it works for you, you can permanently define it as a tool under "Options/Tools". About the printer, do you get: "file 'prn' cannot be opened for writing"? (And yes, I agree that accessing the printer via a device file is silly, but that's the way it is/was under Dos.) After pressing Esc, will it work normally? (If that's all, I could probabably get rid of this somehow.) Frank
Previous mail
Next mail
Unformatted/full headers
Overview 10 days
Subject
Date
Thread
Author
| Author | Subject | Date |
|---|---|---|
| Rugxulo | Hi everyone - got a question about GPC | 18 Feb 2010, 14:24:35 |
Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.
Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.
This page was created by Crystal 0.999 (Linux 2.4.27/i686).