Everything2
Near Matches
Ignore Exact
Full Text
Everything2

make clean

created by ariels

(thing) by ariels (2 d) (print)   ?   (I like it!) Mon Apr 02 2001 at 9:13:36

The traditional makefile target for cleaning up various files, particularly object files from the build. Normally you want to keep them around; the whole point of make is that it only rebuilds the object files that need to be rebuilt. But sometimes you want to get rid of all the by-products, so you add a clean target to your makefile. A simple clean target could look something like this:
clean:
        /bin/rm -f $(OBJS)
# The previous line MUST start with a TAB!
Here it's assumed variable(OBJS) holds the names of all the object files in the project.

Two common uses for make clean:

  1. A build is just "make clean; make all".
  2. Since make only looks at modification times of files, if you want to change the compilation flags you have to force all targets to be rebuilt; "make clean; make CFLAGS=-g" is a good way to do this.

printable version
chaos

make all Command Line Porn Makefile make
Python tab Chief Wahoo build
Make Believe SED IRQ
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Nodes to live by:
Scoville heat unit
Jennifer, is she your friend?
World of Warcraft
haggis
How to write an episode of the A-Team
Texas
Bourbon
leaving out parts of the truth. you have to.
How I invented Anna and made her a character in all my stories
HIV test
Douglas Coupland
Mandelbrot set
Life is a Rock
New Writeups
SwimmingMonkey
Conversations with Fo Fo- the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
calgon
Buffalo Bill by the pool(poetry)
gate
Anarchy is Order(idea)
ushdfgakjasgh
Scribeling(thing)
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
Everything 2 is brought to you by the letter C and The Everything Development Company