LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-30-2005, 04:01 AM   #1
syeronne
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Rep: Reputation: 0
Question "make uninstall" missing


Hi,

How to perform a clean uninstall when target uninstall in Makefile does not exists or do nothing ?

Thanks in advance
 
Old 11-30-2005, 04:54 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,508

Rep: Reputation: 100Reputation: 100
Hmm - no idea but a word of advice - unless you are very tight on disk space not doing a clean uninstall shouldn't be a problem. If, for example, you are upgrading a program, it is usually safe (but not good practice, as you seem to realise) to just delete the main executable, and compile and install the new version of the program.

This works for me with SAMBA, for example, which comes as a very old version with my FC3 distro, and I always "upgrade" it after installing by simply deleting all files I can find which start with "sm" on my filesystem, and then compiling the new version - an uninstall with a makefile is impossible, as the SAMBA I have available post-install is apparently done from an RPM or something. AND - I am loathe to uninstall a RPM installed file (I am loathe to use RPM under -any- circumstances at all) since this often seems to land other people in dependency hell.
 
Old 11-30-2005, 05:14 AM   #3
syeronne
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
The problem is that usually, "make install" does not install only an executable but some additional files. More than that, if your executable is named "test", additional files may not contain "test" inside their own name. Cleaning all files with "test" will leave some files on your disk.

I don't like the idea of leaving unused files on my disk, even if, as you said, I have enough space on my disk.

My concern is that with "make install" I don't have any idea of what is installed really on my disk. I tried to look in Makefile in the install target, or even tried "make -n install" but I'm not using Linux for enough time to be cumfortable with that. I'd like to have some option, like "rpm -ql" to see what and where is going to be installed.
 
Old 11-30-2005, 05:36 AM   #4
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 31
Provided the makefile support DESTDIR variable, you may use

make install DESTDIR=/path/to/a/fakeroot

to install the program to a fakeroot first, log everything it installed, then begin the actual installation, or just use io redirect or tee command to log the "make install" output, and examine the log carefully.

Another quick and dirty way is using checkinstall to make a package.
 
Old 11-30-2005, 09:05 AM   #5
syeronne
LQ Newbie
 
Registered: Nov 2005
Posts: 15

Original Poster
Rep: Reputation: 0
Just to be sure I understand the way make is working.

As an example, make may produce an executable, let's call it "test" installed in /usr/local/bin/ and some manual pages, let's call it "man.test" installed in /usr/local/man/, by default. That means that "/" is the root directory.

If I use variable DESTDIR i'm going to change the roo directory ?

In my example, "make install DESTDIR=/home/myname/" would copy "test" in /home/myname/usr/local/bin and "man.test" in /home/myname/usr/local/man/" ???


To get further, I could run several make command using different DESTDIR resulting in multiple "test" installs ?
 
Old 11-30-2005, 09:43 PM   #6
T.Hsu
Member
 
Registered: Jan 2005
Posts: 178

Rep: Reputation: 31
Yes, you are right.
 
Old 12-01-2005, 02:27 AM   #7
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,508

Rep: Reputation: 100Reputation: 100
Quote:
Originally posted by syeronne
Just to be sure I understand the way make is working.

As an example, make may produce an executable, let's call it "test" installed in /usr/local/bin/ and some manual pages, let's call it "man.test" installed in /usr/local/man/, by default. That means that "/" is the root directory.

If I use variable DESTDIR i'm going to change the roo directory ?

In my example, "make install DESTDIR=/home/myname/" would copy "test" in /home/myname/usr/local/bin and "man.test" in /home/myname/usr/local/man/" ???


To get further, I could run several make command using different DESTDIR resulting in multiple "test" installs ?
Yes that's pretty much it. This is a usefull way to test new, or doubtful software or libraries. For example, I have two GTK versions on my system - the one that came with FC3 and the a newish 2.6 version. I installed the "second" GTK by doing

./configure --prefix=/opt/gtk2.6

on all the source library files for GTK 2.6 which installed GTK 2.6 in the /opt directory. By setting up certain environment variables I am thus able to selective compile a program against either the "new" GTK or the "old" GTK on my system. Everything about the "new" GTK is in the opt subidrectory - libraries, scripts, man pages, the works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am getting this error "Missing Seperator" when I try make. NewToLinux2005 Linux - Software 5 08-11-2011 09:06 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
suse ati driver "Xlib: extension "XiG-SUNDRY-NONSTANDARD" missing" madcow007 Linux - Hardware 0 03-06-2004 03:53 PM
help with "make" error "Missing seperator" hrishikesh Linux - Software 1 07-18-2003 02:40 AM
LFS 4.1: Stalled at Perl, "missing seperator" error from "make" SparceMatrix Linux From Scratch 1 06-07-2003 04:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration