Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: normann on December 28, 2017, 02:03:53 pm

Title: BUG REPORT: The application can't determine return code of make process
Post by: normann on December 28, 2017, 02:03:53 pm
If I switch on the option of "This is a custom Makefile" in the project settings then the application can't determine correct return code of $make process and after trying to "$make -q -f $makefile" joyfully reports to me that "Nothing to be done (all items are up-to-date)".
Title: Re: BUG REPORT: The application can't determine return code of make process
Post by: oBFusCATed on December 28, 2017, 02:35:22 pm
And what is the exit code of this command if you execute it in terminal?

Can you post some version information of cb,os,compiler,make, etc...
Title: Re: BUG REPORT: The application can't determine return code of make process
Post by: normann on January 10, 2018, 09:01:45 am
The command is:
./gen_target.sh $target && $make -q -f $makefile

Return code is 1 (when I run it under bash command line).
gen_target.sh is script generating a makefile.


x86_64 GNU/Linux
GNU Make 3.82
CB svn 11246
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-7)
Title: Re: BUG REPORT: The application can't determine return code of make process
Post by: oBFusCATed on January 10, 2018, 09:52:45 am
What happens if you put these in a script file?
I'm not sure we execute anded commands well.
Title: Re: BUG REPORT: The application can't determine return code of make process
Post by: normann on January 16, 2018, 10:27:46 am
When I run it under command line, its result is ok.
I provide you citation of the gen_target.sh
Code
#!/bin/sh

#Скрипт генерирует мэйкфайл с добавлением значения параметра коммандной строки ($1) к переменной CONFIG Qt .pro файла.
#qt.sh is for Qt env. variables
. ~/qt.sh

rm target.pro

echo CONFIG += $1 > target.pro

if [ $? -eq 0 ]; then
        qmake -makefile tableview2.pro;
else
        exit 1;
fi

Just examine the work of CB yourself.