Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).

Assignment 2 and Clarifications.
 
Options:
RSS cloud
Jump to:

Assignment 2 question 1

9 of 390 articles shown, currently no other people reading this forum.
photo
From: Karan R.
Date: Mon 25th May, 12:02pm
Actions: 
        Login-to-reply
I am calling my updateversion.sh script within the Makefile.
Since the inputs will be different - 
1.project in updateversion.sh will receive the project directory
2.script being called in Makefile will run for Makefile and *.c files
, could i submit 3 scripts - 
1. Makefile
2. update script to be run within the Makefile
3. updateversion.sh

Thanks
Karan

Assignment 2 question 1

photo
From: Christopher M.
Date: Mon 25th May, 1:48pm
Actions: 
        Login-to-reply
Hi Karan,

"Karan Rebello"                               wrote:

> 1.project in updateversion.sh will receive the project directory

NO, not the project *directory*,  but the project's *name*.

Just submit your updateversion.sh shellscript,  and your modified Makefile.

Assignment 2 question 1

photo
From: Karan R.  O.P.
Date: Mon 25th May, 2:30pm
Actions: 
        Login-to-reply
Thanks for the clarification.

Just one last doubt. When you say project name, you mean the .c file correct and not the folder containing multiple .c files?

Thanks
Karan

Assignment 2 question 1

photo
From: Karan R.  O.P.
Date: Mon 25th May, 2:45pm
Actions: 
        Login-to-reply
Kindly provide an example if you can as to what input you would be providing. If I am not mistaken, many students are having a problem with this question.

Kind regards

Assignment 2 question 1

photo
From: Christopher M.
Date: Mon 25th May, 2:58pm
Actions: 
        Login-to-reply
"Karan Rebello"                               wrote:

> Thanks for the clarification.
> 
> Just one last doubt. When you say project name, you mean the .c file correct and not the folder containing multiple .c files?

If the project is named 'calcmarks' (could be any other name), that does not suggest/imply the
files that need updating, or the directory where the work is being performed  (it will *always* be the current working directory).

You need to update all *.c, *.h, and the Makefile, the already have the named project in their version comment.

Assignment 2 question 1

photo
From: Christopher M.
Date: Mon 25th May, 2:59pm
Actions: 
        Login-to-reply
"Karan Rebello"                               wrote:

> Kindly provide an example if you can as to what input you would be providing. If I am not mistaken, many students are having a problem with this question.

I'm (honestly) confused as to what is confusing you about this question.

Does my immediately previous reply clarify things?

Assignment 2 question 1

photo
From: Karan R.  O.P.
Date: Tue 26th May, 3:26pm
Actions: 
        Login-to-reply
Hi, I understood the question now. Have been able succesffuly pass command line argument while calling the target using make.

My code seems to be working, however i'm getting the following error -

cc -std=c99 -Wall -pedantic -Werror -c calcmarks.c
make: cc: Command not found
make: *** [Makefile:10: calcmarks.o] Error 127

Is this because i'm using wsl instead of ubuntu or any other unix os?

Kind regards
Karan

Assignment 2 question 1

photo
From: Maktoom A.
Date: Tue 26th May, 4:16pm
Actions: 
        Login-to-reply
This is likely because the GNU C Compiler is not installed. This is used by Make to compile the program. You can install it by : sudo apt install build-essential

Assignment 2 question 1

photo
From: Karan R.  O.P.
Date: Tue 26th May, 6:28pm
Actions: 
        Login-to-reply
Thanks a lot , mate!! Works now :)
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  8:27am May 24 2020