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


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

Assignment 2 - Q1

1 of 390 articles shown, currently no other people reading this forum.
From: Christopher M.
Date: Tue 12th May 2020, 12:18pm


Hi Nathan,

"Nathan Scott" <18*1*1*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> Hi Chris, I have read the other related topics for Q1 and they do not answer my 
> question.
> For Q1, what exactly do you want?  In the assignment spec you indicate a shell script 
> which accepts one arg (the project name), however in one of the answers on the help 
> forum you seem to indicate that you want something that runs with 'make updateversion'  
> , in this case there are no args passed and it is using make.  So updateversion is a 
> Makefile?

Running   make updateversion

requests that the  make  program runs, it finds/reads the Makefile (providing the specifications)  
and, if necessary, executes the commands for the target named 'updateversion'.

As a good practice, we have one project, and one Makefile, per directory,  so the Makefile will 
already know the name of the project in the current directory, and will be able to pass it to the 

Any clearer?

> > My understanding was that you want a bash script that accepts one argument (the 
> project name), so we run it like '>/updateversion some_project_name'.  It then looks 
> in the folder in which the script is located for 'Makefile', which it opens and checks 
> the header comment '# projectname, ...' to match with the project name arg passed to 
> the script.  Once that is all done, it can then deconstruct the Makefile extracting 
> all the .c and .h filenames and then going and finding each one and changing the 
> header comment as well as noting any anomalies.  Finally, it then changes the header 
> comment in 'Makefile' itself.  All this done with the bash script, nothing to do with 
> make.  However, I'm not sure about that last comment => 'Finally, add a new target to 
> the project's Makefile to update the version number in the C source files and in the 
> Makefile.'  Hang-on, I thought my script was supposed to have already done that!?

Related articles

Assignment 2, Q1 (all 16) RSS
├─ original   Mon 11th May 2020, 4:47pm, Mingbo Z.
├─ reply 1   Mon 11th May 2020, 5:04pm, Christopher M.
├─ reply 2   Tue 12th May 2020, 12:03pm, Nathan S.
├─ THIS   Tue 12th May 2020, 12:18pm, Christopher M.
├─ reply 4   Tue 12th May 2020, 12:39pm, Nathan S.
├─ reply 5   Tue 12th May 2020, 2:21pm, Christopher M.
├─ reply 6   Tue 12th May 2020, 2:47pm, Nathan S.
├─ reply 7   Tue 12th May 2020, 2:58pm, Christopher M.
├─ reply 8   Tue 12th May 2020, 7:56pm, David M.
├─ reply 9   Tue 12th May 2020, 10:42pm, Thanh T.
├─ reply 10   Wed 13th May 2020, 6:43am, Christopher M.
├─ reply 11   Wed 27th May 2020, 1:19pm, Matthew W.
├─ reply 12   Wed 27th May 2020, 3:42pm, Christopher M.
├─ reply 13   Wed 27th May 2020, 4:50pm, Jichunyang L.
├─ reply 14   Thu 28th May 2020, 9:39am, Christopher M.
└─ reply 15   Sun 31st May 2020, 11:38am, Akhil E.
This Page

Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020