Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: comp.lang.misc Subject: Re: Compiling and linking code from different places in the file system Date: Thu, 15 Mar 2018 09:00:09 +0100 Organization: Informatimago Lines: 54 Message-ID: References: <9K6qC.684$hq2.22@fx42.am4> Mime-Version: 1.0 Content-Type: text/plain X-Trace: individual.net f+q17w5evT/p8CLXPwTVNw91f+nQSMAAOMZgzdRamb8mvhmS0a Cancel-Lock: sha1:Yzg0ZjA3MTdlMGYwNjQwNGRkZjJjZGZiMGZlYzIzMTIxNzFjYTRlMg== sha1:5Dj093LqG6yyvVnbUaTqX14D6s8= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Xref: csiph.com comp.lang.misc:3909 bartc writes: > On 14/03/2018 15:52, David Brown wrote: >> On 14/03/18 12:30, bartc wrote: > >>> On Windows, I've only seem them associated with C compilers, if they >>> even have one. >>> >> >> The first version of "make" that I used on Windows (it was actually a >> DOS program, but I ran it under Windows 3.1) came with a Pascal compiler >> and I used it primarily for assembly. >> >> "make" is certainly traditional for C (and C++) programs, but is not at >> all restricted to that. I also use it for assembly code, LaTeX >> documentation, some types of graphics work, and for generating gettext >> files in some of my Python coding (for multiple language support). It >> is a handy general-purpose tool. >> >> But it is a powerful and complex tool, and some makefiles are rather >> complex. It's debugging facilities are rather limited, and it has a >> some oddities (like requiring tab characters, not spaces, for >> indentation). >> >> Often, however, very simple makefiles are sufficient - sometimes the >> default rules are good enough. On a *nix system, or a Windows system >> with suitable utilities (like msys2 and mingw), you can write a C file >> called "prog.c" and generate an executable by just writing "make prog". >> You really don't get simpler than /no/ makefile at all. > > make prog doesn't work with DMC, lccwin or Pelles C (as far as I got > before giving up). > > So you're saying I can build programs without makefiles, provided I > download half of Unix first in the form of msys and cygwin? OK. > > But typical compilers will let you do: cp prog.c -oprog.exe, where cp > is the compiler program. > > If that's too difficult, then a batch file like the following cc.bat file: > > cp %1.c -o%1.exe > > will let you type: > > cc prog > > A one-line batch file eliminates the need to download msys2; how about that. Trivial case is trivial. DUH! -- __Pascal J. Bourguignon http://www.informatimago.com