Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #163581

Re: Universal Build System for C

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.c
Subject Re: Universal Build System for C
Date 2021-11-23 01:00 +0000
Organization A noiseless patient Spider
Message-ID <87k0gzfzzb.fsf@bsb.me.uk> (permalink)
References <933b95c1-8c8c-48dc-ae58-d49806746b2fn@googlegroups.com> <157cb0a7-adc0-411f-8f43-4717a5d888dan@googlegroups.com> <87wnkzgc1k.fsf@bsb.me.uk> <b6d1ff61-254c-4f1c-a582-6579a2b785dfn@googlegroups.com>

Show all headers | View raw


Thiago Adams <thiago.adams@gmail.com> writes:

> On Monday, November 22, 2021 at 5:39:47 PM UTC-3, Ben Bacarisse wrote:
>> Thiago Adams <thiago...@gmail.com> writes: 
>> 
>> > On Monday, October 4, 2021 at 9:34:03 AM UTC-3, Thiago Adams wrote: 
>> > 
>> > [...] 
>> > " 
>> > if (system("cl " 
>> > SOURCE_FILES 
>> > " -o output_file.exe") != 0) 
>> > { 
>> > exit(1); 
>> > } 
>> > " 
>> > 
>> > 
>> > I little update: 
>> > When I wrote the script using "system" I didn't know that system on linux 
>> > does not return the exit code of the application it executes.
>> This is not really a C question. What system will report is very much 
>> determined by the implementation. 
>> 
>> If all goes well (there is a non-null argument and a shell that can be 
>> executed) then it returns the exit status of the shell. That's the exit 
>> status of the last comment the shell ran. 
>> 
>> Why is this not good enough?
>
> The objective is to know if the compilation failed or not. I am not sure
> if gcc reports fails. ( I am checking )

Yes it does.  I think you'll find that if you get 0 from system, the
compile worked.

-- 
Ben.

Back to comp.lang.c | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-04 05:33 -0700
  Re: Universal Build System for C Branimir Maksimovic <branimir.maksimovic@icloud.com> - 2021-10-04 15:54 +0000
  Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 09:26 -0700
    Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 09:47 -0700
      Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-04 10:13 -0700
        Re: Universal Build System for C fir <profesor.fir@gmail.com> - 2021-10-05 04:12 -0700
  Re: Universal Build System for C Guillaume <message@bottle.org> - 2021-10-04 19:49 +0200
    Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-04 11:00 -0700
  Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-06 20:37 +0100
    Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-07 06:18 -0700
      Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-07 06:25 -0700
        Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-07 07:41 -0700
          Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 14:05 -0700
            Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-08 14:22 -0700
              Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 14:44 -0700
                Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-10-08 23:25 +0100
                Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 15:37 -0700
              Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-08 22:51 +0100
                Re: Universal Build System for C Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-10-09 01:39 -0700
                Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-09 11:00 +0100
              Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-10-10 18:09 +0000
                8-bit ASCII (was Re: Universal Build System for C) scott@slp53.sl.home (Scott Lurndal) - 2021-10-10 20:55 +0000
            Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-10-08 23:05 +0100
              Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 15:30 -0700
                Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 18:12 -0700
                Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-10-08 20:51 -0700
                Re: Universal Build System for C David Brown <david.brown@hesbynett.no> - 2021-10-09 12:54 +0200
                Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-09 06:30 -0700
                Re: Universal Build System for C David Brown <david.brown@hesbynett.no> - 2021-10-09 17:29 +0200
            Re: Universal Build System for C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2021-10-08 23:39 +0000
              Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-10-08 17:50 -0700
  Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-11-22 04:26 -0800
    Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-11-22 20:39 +0000
      Re: Universal Build System for C Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2021-11-22 13:18 -0800
        Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-11-22 21:49 +0000
          Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-11-23 14:45 +0000
            Re: Universal Build System for C Bart <bc@freeuk.com> - 2021-11-23 16:03 +0000
              Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2022-04-18 14:39 -0700
                Re: Universal Build System for C Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2022-04-18 22:17 +0000
                Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2022-04-18 16:07 -0700
        Re: Universal Build System for C scott@slp53.sl.home (Scott Lurndal) - 2021-11-23 14:44 +0000
      Re: Universal Build System for C Thiago Adams <thiago.adams@gmail.com> - 2021-11-22 16:19 -0800
        Re: Universal Build System for C Ben Bacarisse <ben.usenet@bsb.me.uk> - 2021-11-23 01:00 +0000

csiph-web