From kde-devel Tue May 27 08:37:22 2003 From: Stephan Kulow Date: Tue, 27 May 2003 08:37:22 +0000 To: kde-devel Subject: Re: Cleaning a directory before install X-MARC-Message: https://marc.info/?l=kde-devel&m=105402477418774 On Wednesday 28 May 2003 07:23, Andras Mantia wrote: > Hi, > > I would like to ask an auto* guru: is there an easy possibility to clean up > the target install directory just before installing the new files? The user > should type simply "make install" and the old files should be removed and the > new ones installed. Hmm, no simple way no. And you really shouldn't bother too much with it anyway in the hope people use package managers :) But if you want a way (assuming you have something like data files that you parse as *): install-data-hook: cd $(DESTDIR)$(mydatadir) ;\ for file in *; do \ if ! echo " $(mydata_DATA) " | grep -q " $$file "; then \ echo rm $(DESTDIR)$(mydatadir)/$$file ;\ rm $$file ;\\ fi ;\ done you see: you don't really want that. You should prefer marking your data with a version and ignore in the program those of an older version. Greetings, Stephan >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<