Hi. Im currently writing a fairly nifty software project that makes use of GNU autotools extensively, although in a very basic way. My aim is to create a package manager in the style of RPM via automake. Im aiming to create both a *distro AND platform independent* package manager for Linux. Things were proceeding smoothly until i hit a problem.
At the moment i have created a whole load of scripts, that download, extract, configure make and perform make install on a standard source gzipped tarball, with the aim of automating installation and uninstallation for average member of Joe Public who understands nothing about compiling c/c++ code and couldnt care less. The software is downloaded into the users home directory, compiled and installed. Once installation is complete, make clean is executed in the folder containing the compiled software. A copy of this folder is then made into a system folder, /usr/share/merlin, and the original folder in the home directory is deleted. The aim is to be able to use the copy of the software in /usr/share/merlin to uninstall the software from the machine using make uninstall. Unfortunately when my script jumps into /usr/share/merlin and does make uninstall it triggers an error. Irritatingly when i perform what is essentally the same procedure by entering commands manually at a terminal things work without problems. This problem is starting to drive me slightly nuts, if anyone out there could help me i'd be very grateful! (More information about the specifics of what im trying to do and the problem im hitting can be found in the attachment to this message) Cheers :) -=+Stephen Ellwood+=-
# This script file describes succintly what i wish to do with my program. # When i enter the following list of commands manually into a terminal this works fine and i can configure, make, install and uninstall the software at will. # download and extract files wget http://ftp.gnu.org/gnu/hello/hello-2.1.1.tar.gz tar -xzf hello-2.1.1.tar.gz # compile downloaded software cd hello-2.1.1 ./configure make sudo make install make clean # move folder to a different location cd .. cp -r ./hello-2.1.1 ~ # change to the copy of the folder in this new location and # uninstall the software from the system, using the copy of the original folder in the new location. cd ~/hello-2.1.1 sudo make uninstall ********************************* # In my script software i am essentially performing the same procedure as above but the functionality is split between several script wrappert files. # The following commands are all called via a test script, called usig sudo so the whole script runs with superuser priviliges # download and extract files wget http://ftp.gnu.org/gnu/hello/hello-2.1.1.tar.gz = contained within ./download.sh tar -xzf hello-2.1.1.tar.gz = contained within ./untar.sh cd hello-2.1.1 = contained within compile.sh ./configure = contained within compile.sh make = contained within compile.sh make install = contained within install.sh make clean = contained within install.sh cd .. = contained within install.sh cp -r ./hello-2.1.1 /usr/share/merlin = contained within install.sh # Note in my script software the above line is slightly modified compared with the manual procedure. # Instead of making a copy of the folder in ~ a copy is made in a system folder /usr/share/merlin. # This can be done by BASH as all these commands are contained in a script that is run as root. rm -r ./hello-2.1.1 # note that this line is not in the original procedure, we delete the original copy of the folder = contained within install.sh # since we have a safe copy in a new location. cd /usr/share/merlin/hello-2.1.1 = contained within uninstall.sh make uninstall = contained within uninstall.sh # Despite the fact that these two processes are essentially equivalent as far as i can see the scripted version of the procedure does not work. # When my test script executes uninstall.sh, as soon as the 'make uninstall' line is reached the whole thing grinds to a halt # The following error is generated: /home/ste/merlin/hello-2.1.1/missing: line 46: aclocal-1.6: command not found WARNING: `aclocal-1.6' is missing on your system. You should only need it if you modified `acinclude.m4' or `configure.ac'. You might want to install the `Automake' and `Perl' packages. Grab them from any GNU archive site. /bin/sh: /home/ste/merlin/hello-2.1.1/missing: No such file or directory make: *** [Makefile.in] Error 127 # NB: Im sure automake and perl are on my system: normally i can compile and install code without problems using autotools. # Note that i tried to solve the bug by rewriting my script so that all textual occurences of "/home/ste/merlin" are replaced # with "/usr/share/merlin" in all the makefiles and scripts etc within /usr/share/merlin/hello-2.1.1 however this makes no difference; i still get this error. # As far as i can tell i have not modified the files mentioned in the error message, so i have no idea why im getting this error! Completely stumped! :) # if you could help me out i can be contacted at [EMAIL PROTECTED] or via the list. # Cheers! :)