You are not logged in.
I am jsut a little curious what happens behind the curtains of the while configure, make, make install method. Configure checks to see what your system is capable of, make compiles the source to binaries, and make install ... that copies the binaries to the system folders and creates symlinks and stuff, right? So if I were to extract a tarball to my home directory, do a configure, make, make install, it's fine to erase the directory in ~, right? Also, what would one do if they decide to remove the program later?
I think this is the most elementary thing I am unsure about for how far I've gotten in linux Thought I'd clear it up, thanks all!
Offline
If you want to remove it later, you should hope the provider have made a 'make uninstall' script. Usualy they have not. Second solution is using checkinstall instead og 'make install', but it does not work with Arch (I believe). Third and best solution is making a PKGBUILD, and install and uninstall with packman.
Offline
I removed my sig, cause i select the flag, the flag often the target of enemy.
SAR brain-tumor
[img]http://img91.imageshack.us/img91/460/cellphonethumb0ff.jpg[/img]
Offline
Offline
for some applications at least, you don't really need the 'make install' part. Linuxdcpp, for example, is possible to run with ./ldcpp after you've built it with make.
Anyway, to write a PKGBUILD is the best thing to do. It gurantees proper removal of the application.
Offline
I am jsut a little curious what happens behind the curtains of the while configure, make, make install method.
Oh oh oh! Goody, I like these things!
The typical configure/make/make install setup is what's referred to as an "autotooled build". They are usually (but not always) created by autotools (autoscan, autoconf, autoreconf, automake). That is, the original developer makes some *.in and *.am files, which are used to generate those huge scripts.
The "configure" script is a bash script, usually generated from a configure.in file. If you take a peek at it, it's usually ridiculously long and complex. Autogenerated stuff usually is. On a typical autotooled build, the configure script converts a "config.h.in" file to "config.h" - for inclusion into the source code, which is usually a series of C #define statements, letting the code know what features the system has.
The configure script also converts Makefile.am files to real Makefiles. These are used by "make" when it is run, to know how to properly do whatever it needs to do (compile this, copy that, etc etc). Makefiles are set up in terms of "rules". By default, running "make" reads the Makefile and looks for a rule named "all". Running "make SOMETHING" looks for a rule named "SOMETHING".
There are usually many rules in a given Makefile, especially an autotooled one. However, the important ones, to an end user, are "all" and "install" (as well as "uninstall" and possibly "clean"). Most of these are created automatically by autotools. Typically, "all" will compile everything it needs to, generate/create documentation files, and so whatever else the developer wants it too. "make install" then copies all those built files where they need to go.
Now, I need to disclaim this. Autotooled builds, while good and portable, are crap. It is much easier to write a Makefile by hand. It just has a bit or a learning curve for some. There are many other alternatives to using autotools, such as SCons, Cons, and some custom scripts. I prefer the simplicity of writing a Makefile and a "rules" file for that Makefile, with simple instructions to edit the rules.
If you're interested in autotools, here's the de facto book:
http://sources.redhat.com/autobook/
Enjoy!
Offline
Ahhh, interesting, I think I'm starting to get the jist of it. From all the small talk about uninstalling software, I had a feeling that it was a bit sketchy. Nice links everyone, thanks for the help! I'm definately going to try the pkgbuild method to do things if I need to ... maybe you'll even see a bit of contributed binary from me in the future
Offline
... oodles of shite ...
Got a little bit excited there phrakture...
haha, I just tried to tab complete "phra" -> "phrakture". I rock. LIFE IS IRC.
Offline
One small correction:
By default, running "make" reads the Makefile and looks for a rule named "all". Running "make SOMETHING" looks for a rule named "SOMETHING".
by default, running 'make' builds the first target in the makefile - it doesn't scan for the 'all' target.
For example, copy this into a temp folder and name it Makefile:
testing:
echo "I'm testing!"
all:
echo "All!"
And run 'make' - it will echo "I'm testing!"
Offline
thanks for the explanation guys, this will come in handy.
KISS = "It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience." - Albert Einstein
Offline
by default, running 'make' builds the first target in the makefile - it doesn't scan for the 'all' target.
Heh, my fault. For some reason I had a memory of doing "make" with no Makefile and it says "nothing to be done for 'all'" - but I'm wrong.
Offline
..I'm wrong
>>> (1.0/5759.0)*100
0.017364125716270183
Not a bad. You've still got it, I'd say.
Offline
To have a practical example to see what a (very easy and hand-written) "configure"-file may look like, you can inspect the configure file of "fspanel" (it's in AUR).
Since I spent one night patching it, I understand how that files work...
jakob
Offline
a higly unrecommended but working approach(may have side effects) is to remove manually the various files by using locate and rm
Unlike windows i do not think there is a registry which needs to be updated
Be yourself, because you are all that you can be
Offline
a higly unrecommended but working approach(may have side effects) is to remove manually the various files by using locate and rm
Unlike windows i do not think there is a registry which needs to be updated
No, but the typical 'make install' puts crap in lots of different places and it would be difficult to find all of the stuff by hand. Much better to just use a package manager.
Offline
Now, I need to disclaim this. Autotooled builds, while good and portable, are crap. It is much easier to write a Makefile by hand. It just has a bit or a learning curve for some. There are many other alternatives to using autotools, such as SCons, Cons, and some custom scripts. I prefer the simplicity of writing a Makefile and a "rules" file for that Makefile, with simple instructions to edit the rules.
I disaree, trying to make a portable makefil when you do not know the version of make the end user are using, which c-compiler is installed, which shells are available, what OS they are using and so on, is a pita. Autotools may be comprihensive, and making bloated makefile, but at least it is working on (nearly?) any given platform. But maybe there is even better tools, have not been looking for others.
Offline