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).
 
Options:
RSS cloud
Jump to:

Assignment 2 - Q1

1 of 390 articles shown, currently no other people reading this forum.
photo
From: Nathan S.
Date: Tue 12th May, 12:39pm
Actions: 
        Login-to-reply

 

"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:

> 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 
> shellscript.
> 
> 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!?



Nope, still do not get it, I watched the lecture, but maybe I missed a key concept from it or 
something.  The specification says that 'updateversion' is a 'shellscript', that means a bash script or 
a makefile or something else?  I would have thought 'make updateversion' would be like telling make 
(which I understand is some program) to run 'updateversion' which should have Makefile syntax inside, 
no?  If updateversion is a bash script, how is that going to work?  Can make run bash scripts?   

Related articles

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


Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020