modula3 / cm3

Critical Mass Modula-3
http://modula3.github.io/cm3/
Other
139 stars 25 forks source link

What does quake do? #1070

Closed ghost closed 2 years ago

ghost commented 2 years ago

Is .quake format a kind of import library so quake itself is the librarian?

https://github.com/modula3/cm3/tree/master/m3-win/import-libs/src

VictorMiasnikov commented 2 years ago

quake is part of cm3[.exe]

"quake" is "our Modula-3 cmake / make"

ghost commented 2 years ago

quake is part of cm3[.exe]

"quake" is "our Modila-3 cmake / make"

How to use it?

mikanystrom commented 2 years ago

When you type the command "cm3" at your shell, you are "using" Quake... what is your question??

On Fri, Sep 9, 2022 at 4:04 PM pwd96m4a @.***> wrote:

Reopened #1070 https://github.com/modula3/cm3/issues/1070.

— Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/1070#event-7359844152, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKYNJOMLHH5KXB2W26SVCTV5O66PANCNFSM6AAAAAAQIP2QZU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghost commented 2 years ago

When you type the command "cm3" at your shell, you are "using" Quake... what is your question??

How to generate and how to use the import libraries like what on https://github.com/modula3/cm3/tree/master/m3-win/import-libs/src? It's weird. The file make-lib-1.cmd as the extension tells it's Windows Batch file but indeed it's a Perl script! From the other .cmd files it seems cl.exe (Microsoft MSVC Compiler) is required. So will these .quake import libraries work with MinGW too? It's a mess!

VictorMiasnikov commented 2 years ago

It is simple: any .py / .cmd / .bat / Perl scripts has used only on bootstrap step. ( or for set up OS variables, etc. )

One time per life.

In case AMD64_MINGW target all "GCC .a" linked by Quake file "AMD64_MINGW" from "config" folder.

( Running gcc.exe try link and Microsoft .libs, but it don't found they, write warning and continue work)

10.09.2022, 06:06, "pwd96m4a" @.***>:

When you type the command "cm3" at your shell, you are "using" Quake... what is your question??

How to generate and how to use the import libraries like what on https://github.com/modula3/cm3/tree/master/m3-win/import-libs/src? It's weird. The file make-lib-1.cmd as the extension tells it's Windows Batch file but indeed it's a Perl script! From the other .cmd files it seems cl.exe (Microsoft MSVC Compiler) is required. So will these .quake import libraries work with MinGW too? It's a mess!

VictorMiasnikov commented 2 years ago

P.S.

Run utility FileMon.exe from SysInternals suite.

Build Hello.exe first for AMD64_NT target. See process in running FileMon window (?).

Repeat this for AMD64_MINGW.

It is simplest way for investigate -)

10.09.2022, 06:06, "pwd96m4a" @.***>:

When you type the command "cm3" at your shell, you are "using" Quake... what is your question??

How to generate and how to use the import libraries like what on https://github.com/modula3/cm3/tree/master/m3-win/import-libs/src? It's weird. The file make-lib-1.cmd as the extension tells it's Windows Batch file but indeed it's a Perl script! From the other .cmd files it seems cl.exe (Microsoft MSVC Compiler) is required. So will these .quake import libraries work with MinGW too? It's a mess!

mikanystrom commented 2 years ago

As Victor said, the cmd/py/sh and whatnot is just for bootstrapping the compiler. Since the compiler is written in Modula-3, and the quake interpreter itself is part of the compiler, when bootstrapping the system you have neither quake nor Modula-3 available. So it's special. That's like any compiler written in itself, getting it set up the first time is always going to involve some strange and tricky steps.

When you are using Modula-3 after it's installed, you code only in quake. Most small programs require only a single file of that, and it's called m3makefile and lives in the src directory. cm3 reads and executes the commands in said m3makefile to know how to build and link your program/library.

Mika

On Sat, Sep 10, 2022, 5:06 AM pwd96m4a @.***> wrote:

When you type the command "cm3" at your shell, you are "using" Quake... what is your question??

How to generate and how to use the import libraries like what on https://github.com/modula3/cm3/tree/master/m3-win/import-libs/src? It's weird. The file make-lib-1.cmd as the extension tells it's Windows Batch file but indeed it's a Perl script! From the other .cmd files it seems cl.exe (Microsoft MSVC Compiler) is required. So will these .quake import libraries work with MinGW too? It's a mess!

— Reply to this email directly, view it on GitHub https://github.com/modula3/cm3/issues/1070#issuecomment-1242604062, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKYNJLIS6YQORZKNJ3UCZDV5P3JRANCNFSM6AAAAAAQIP2QZU . You are receiving this because you commented.Message ID: @.***>