THE DEPENDENCY RELATIONSHIP BETWEEN A SET OF FILES WHICH COMPRISE AN APPLICATION

Qualified Writers
Rated 4.9/5 based on 2480 reviews

100% Plagiarism Free & Custom Written - Tailored to Your Instructions

Assignment 3

Instructions:

• use vi (or emacs) to edit the answer for each question in a LATEX document.

• then apply Linux utilities (such as pdflatex if installed) to produce a PDF file.

The submission should be a compressed file, in which a PDF file is included.

Question 1. (15 marks)

Suppose there are two C source (transaction.c and reports.c) and two header files (trans.h and reps.h). Write a Makefile/makefile using explicit rules that reflects the following relationships:

1. The C source files transaction.c and reports.c are compiled to produce an executable accts.

2. transaction.c and reports.c include a header file accts.h

3. The header file accts.h is composed of two other header files: trans.h and reps.h.

(Note that any Linux commands or utilities can be used as the construction command of the makefile if necessary)

Question 2. (15 marks)

Write a makefile that reflects the dependency relationship between a set of files which comprise an application as shown in Figure 1.

The arrows point to the dependent file from the file on which it depends.

1. The application card-exe is created by linking together the object modules main.o and cards.o and the object library liboutput.a.

2. The object library is built from the object file output.o and deck.o; these object files depend upon their corresponding source files.

3. output.o additionally depends on deck.h

4. The header file cards.h contains calling definition (prototypes) for the functions in cards.o and deck.h containing prototypes for deck.c

5. all files which call functions defined in deck.c will need to include deck.h.

6. main.c calls functions from cards.c and output.c, cards.h and output.h must be included in main.c

Question 3. (10 marks)

Use a small text file to experiment with the RCS system. Note that RCS treats all ASCII file the same way; the files do not necessarily be programs, though usually are programs. Specially you should

• Place a $Log$ keyword in the file

• Complete a set of check in operations which result in the RCS file structure depicted in Figure 2.

You will need to make small changes to the source file between check in operations.

• Associate a symbolic name with revision 2.1.1.1

• Make the branch containing revision 2.1.1.1 the default branch

• Use rlog to verify the RCS structure.

Give all the command or command lines used in each step of activities, along with a brief description.

 

 

 

Price: £109

100% Plagiarism Free & Custom Written - Tailored to Your Instructions