LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-19-2006, 10:28 AM   #1
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
Can we discover if DESTDIR is supported before running make?


The subject should pretty much cover the entire question, but let me expand on it just a little for those wondering wth i'm talking about.

I was just in this thread here:
http://www.linuxquestions.org/questi...69#post2252769

And the last post (at the time, from zariweb) got me thinking. I didn't want to clutter up the thread, so I thought I'd start another =)

Quote:
Checkinstall is great for building packages for software that don't honor the DESTDIR in make but I really prefer building them manually when I can.
This is a very good point, and in contemplating the automation of this a little further (something like downloading the slackware build script for a package, building and then installing, or using checkinstall if the package wasn't in the slack repository) I wondered if it was possible to know in advance which software *didn't* honor the DESTDIR in make / make install ?

Is it merely a case of that if the software is using relatively new automake tools and the `./configure && make && make install procedure` that DESTDIR is supported, or is there something else about the process that can be used to determine (from a source directory, ./configure'd if necessary, raw ideally) if a slackbuild script will work for that package?

I hope that's clear - sorry for the somewhat obscure query - feel free to point me at any links I may have missed that will answer this question (I wasn't sure where to look, to be honest, my understanding of the automake process is flakey at best).

Many thanks,
- Piete.
 
Old 05-19-2006, 11:27 AM   #2
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Code:
./configure --help
Should normally have DESTDIR documented if it is supported, otherwise have a read of the makefile
 
Old 05-19-2006, 11:49 AM   #3
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
`grep DESTDIR Makefile`.

If it's there, it will usually work as expected. There are a lot of packages that are stupid about some things and will still try to make changes to your live filesystem. I strongly recommend using tee to log the output of the make install, and then go over it to make sure the Makefile wasn't doing anything dim-witted amongst all the scrolling.
 
Old 05-19-2006, 02:05 PM   #4
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
this is also sometimes implemented in the 'configure' script instead of the makefile such as in MPlayer. I would look at both to be sure.

regards,
...drkstr
 
Old 05-19-2006, 02:18 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Building a good package always means not assuming everything installs cleanly, even though you find traces of DESTDIR in the configure or Makefile scripts. Always use a method to see if files are installed outside of your package target directory - I use installwatch because it writes a clean log, but even so, examining the output from the "make install" stage is equally important.

I would never rely on checkinstall to produce packages. Checkinstall will not catch all installed files in all circumstances. It does a good job in many cases however. Writing a SlackBuild script means you have complete control, but it requires some manual effort.

Eric
 
Old 05-19-2006, 03:09 PM   #6
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Original Poster
Rep: Reputation: 44
Thanks for all the responses. When a slackbuild is available, I generally use it in place of checkinstall. I've found checkinstall to be more than good enough for my lazy bones, was just wondering if there was any advance way of checking for DESTDIR support.

I have no desire to become any sort of package maintainer, I just like being able to uninstall things or grep /var/log/packages/ for things I have installed!

It looks to me as though the answer on the question is: "Sometimes." Which is what I expected. Many people implement destination directory on install in different ways and no automated procedure will catch them all, or be able to deal with the (potentially) infinite varieties of implementations.

So, many thanks to all who've taken the time to answer and think it over =)
- Piete.
 
  


Reply



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
trying to make a list of well supported material under linux (newbies can help) bliblu Linux - Newbie 6 04-11-2006 07:17 PM
Is it possible to add a "DESTDIR" variable in makefiles that don't have it ? nasty_daemon Programming 2 11-25-2005 01:24 PM
make destination DESTDIR jkassemi Linux - General 2 09-24-2005 05:06 AM
how to determine which filesystems are supported by the running kernel? acpi Linux - General 3 04-04-2005 02:38 AM
How to make Solaris 8 UNICODE supported pankajtakawale Solaris / OpenSolaris 0 02-04-2004 08:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:56 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
Open Source Consulting | Domain Registration