[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] make targetclean
From:       "Jason Bodnar" <jason () shakabuku ! org>
Date:       2002-03-22 1:32:03
[Download RAW message or body]

Periodically, I rebuild busybox adding or deleting functionallity as needed.
As a result, I wanted a simple way to clean up busybox's symlinks so things
deleted from the build aren't leftover in my development filesystem.

Attached are uninstall.sh and a patch against Makefile (busybox-0.60.2). I've
added a target called targetclean that will remove the symlinks from $PREFIX
as well as $PREFIX/bin/busybox for good measure.

I'm very much a novice when it comes to makefiles and such so feel free to
edit as needed.

Jason

--
Jason Bodnar
jason@shakabuku.org
http://www.shakabuku.org


["uninstall.sh" (application/x-sh)]

#!/bin/sh

export LC_ALL=POSIX
export LC_CTYPE=POSIX

prefix=$1
if [ "$prefix" = "" ]; then
    echo "No installation directory, aborting."
    exit 1;
fi
h=`sort busybox.links | uniq`

for i in $h ; do
	echo "  Removing $prefix$i"
	rm $prefix$i || exit 1
done

rm -f $prefix/bin/busybox || exit 1

exit 0

["targetclean.patch" (application/octet-stream)]

*** Makefile.orig	Fri Mar 22 02:08:27 2002
--- Makefile	Fri Mar 22 02:09:27 2002
***************
*** 411,416 ****
--- 411,419 ----
  	- cd tests && $(MAKE) distclean
  	- rm -f busybox applet_source_list
  
+ targetclean: uninstall.sh busybox.links
+ 	$(SHELL) $< $(PREFIX)
+ 
  install: install.sh busybox busybox.links
  	$(SHELL) $< $(PREFIX)
  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic