9 Make and Dynamic Memory

9 Make and Dynamic Memory - CMSC 216 Introduction to...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
2/24/11 1 CMSC 216 Introduction to Computer Systems Lecture 9 Make Jan Plane & Pete Keleher {jplane, keleher}@cs.umd.edu Administrivia • Project 2 Questions? • Exam #1 next Thursday CMSC 216 - Wood, Sussman, Herman, Plane 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2/24/11 2 How to run make • Just executing the command " make " will build the first target in the current directory's makefile • Makefiles should be named either " makefile " or " Makefile " • The command " make target-name " will build the target target-name instead of the first target in the makefile CMSC 216 - Wood, Sussman, Herman, Plane 3 Modification times Targets are only built if their dependencies have been updated, using modification times ls can display file modification times: ls -l list files showing their modification time, size, etc. ls -lt list files in order of mod. time (most recent first) ls -lrt invert the sort order of a listing How are file modification times changed? – Changing contents of a file in any way, via a text editor or any other means, adjusts the file's mod. time – UNIX " touch " command can be used to set file mod. time if you need to do it manually • default is to use current time, but can use any date/time • be careful with it – can cause unnecessary compilations, or prevent necessary ones, and usually it's not needed CMSC 216 - Wood, Sussman, Herman, Plane 4
Background image of page 2
2/24/11 3 Make's operation Make constructs a dependency tree based on the makefile A target is out of date when any one of its (direct or indirect) dependencies is newer than itself If a target is out of date, make recreates it by performing the action specified in that target's action – this process is performed bottom to top in the dependency tree Make ensures minimum compilation, if your makefile and dependencies are correct
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 8

9 Make and Dynamic Memory - CMSC 216 Introduction to...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online