Re: Script advice

From: Tony Lawrence (foo_at_pcunix.com)
Date: 08/03/05


Date: Wed, 03 Aug 2005 07:05:20 -0400

Alan Secker wrote:
> I'm about to start compiling and linking program modules under Linux. I
> previously did this under Windows and used a batch file. I want to do the
> same in Linux but the absence of a goto stastement has thrown me a bit.
>
> This is what happens under Windows
>
> The batch file is called by one of three switches:
>
> edit
> compile and link
> run (in debug mode).
>
> If 'edit is chosen, all three processes will be run. If 'run' is selected
> only the last one is run. There is a pause between each process allowing
> escape to the prompt, otherwise it goes back to the top again.
>
> My problem is identifying how to construct an effective loop. Needless to
> say, my script eforts so far have not required constructs of any kind!
>
> TIA
>
> Alan Secker
>

As another poster said, you are looking for a Makefile (see
http://aplawrence.com/Linux/c_compiling_linux.html) , but just as a more
general comment: you mention "goto" but then say "effective loop".

Bash (and all Linux shells) have looping;
http://aplawrence.com/Basics/bash_looping.html might help get you
started with that.

-- 
Tony Lawrence
Unix/Linux/Mac OS X  resources: http://aplawrence.com


Relevant Pages

  • Re: Video editing in Linux?
    ... picked the visual.net package because the compiling was virtually all ... but the majority of windows based games were using the Directx ... shit scared to switch over to openoffice and a linux server here, ... So is that a program or a driver or some kind of wrapper? ...
    (alt.linux)
  • Re: I strongly dislike Python 3
    ... compiling them or just include the python2.5 exe if I port stuff and ... Windows uses the file extension instead of the shebang line to execute ... Might as well spare yourself the trouble and install linux or *bsd. ... I've used several operating systems over many years and each OS has its ...
    (comp.lang.python)
  • Re: free database server for desktop application with ado.net driv
    ... > I've used MySQL on Windows since its 3.x days, ... If it works at all on linux, ... people who have problems compiling it post about it because they want their own optimizations. ...
    (microsoft.public.dotnet.languages.csharp)
  • Script advice
    ... I'm about to start compiling and linking program modules under Linux. ... previously did this under Windows and used a batch file. ... This is what happens under Windows ...
    (comp.os.linux.misc)
  • Re: Can C do it ?
    ... But compiling with getchar under Windows and Linux adds insult ... Linux at least for testing code to make it portable. ... For this getchar understanding task, I tested the code below in this ...
    (comp.lang.c)