Enable 'make uninstall' hook?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Enable 'make uninstall' hook?
# 1  
Old 07-29-2015
Enable 'make uninstall' hook?

Heyas

I'm currently trying to make 'make uninstall' work properly, as it doesnt remove empty directories.

To do so, i've applied:
Code:
uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

As stated (example) in automake - 'make uninstall': Howto remove empty directories - Stack Overflow

Befor i had applied the above 2 lines, the installation went all fine.
After these changes were applied, i did run:
Code:
$ autoconf ; automake --add-missing 
$ ./configure && make && make check && su -c "make install"

Which then fails with:
Code:
Makefile:815: *** missing separator.  Stop.

And the changes seem applied in the project root dir its Makefile.in
Code:
$ tail -n6 Makefile.in | head -n2
uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

Any ideas?
What am i missing?
What more info do you need?

Thank you in advance
# 2  
Old 07-29-2015
Commands in a target rule in a makefile need to start with a <tab> character; not <space>s. Change:
Code:
uninstall-hook:
    if test -d $docdir; then rmdir $docdir; fi

to:
Code:
uninstall-hook:
	if test -d $docdir; then rmdir $docdir; fi

and see if that helps.
# 3  
Old 07-29-2015
Oh doh, crappy copy-paste-'translations'....

Thank you Don
/solved
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get Home Directory for Users in Login Hook Script

I'm writing a script to use as a LoginHook for my Mac users. As part of this script, I need to write to a location in their home directory, but I can't seem to access the path - at this point in the login process, $HOME is empty and ~ gives the path to root's home. Unfortunately, I can't just do... (1 Reply)
Discussion started by: blondepianist
1 Replies

2. Programming

How to hook file changes?

hello, Im trying to create some kind of a file change hook on unix machines (should be generic if possible). Do any of you know how can i write some code that will trigger whenever a file is being modified and then will approve the modifications, or throw an exception if the new content of... (2 Replies)
Discussion started by: ErezB
2 Replies

3. UNIX for Dummies Questions & Answers

The Gary Hook tutorial

Hi All, One more time (!). I have started a contract job and am looking for any online tutorials for AIX, 5 or 5L, just an overview to brush up on system administration, security, networking, etc. with the newer and Linux linked versions. Several people on the web have indicated in other... (1 Reply)
Discussion started by: jeffpas
1 Replies

4. UNIX for Dummies Questions & Answers

The Gary Hook tutorial

Hi All, There has been talk about UNIX self-paced online tutorials written by Gary Hook, and that they are very good, specifically AIX. I am looking for the latest version of AIX, administration, tuning, networking, etc. (Like version 5 or 5L.) Basics to mid-range. I have searched all... (0 Replies)
Discussion started by: jeffpas
0 Replies

5. Linux

how to enable #ifdef macro in the command line of make?

Linux, C++, make, macro In source code, we used some #ifdef macros. How can I enable #ifdef macro in the command line of "make" (NOTE: I do NOT want to change source code or makefile to define that macro from time to time). e.g. test.cpp: ... #ifdef TEST1 // code segment for test1 ...... (3 Replies)
Discussion started by: princelinux
3 Replies

6. Solaris

Perl - How to uninstall? Will pkgrm uninstall all versions?

Hello, I'm working on a Solaris 9/Sparc machine and it has the Solaris 10 version of Perl (5.8.8) installed on it, which always requires all kinds of library files that Solaris 9 doesn't come with. I think the best way to do is to uninstall this wrong version and install the correct Solaris 9... (1 Reply)
Discussion started by: alanlh
1 Replies

7. Solaris

File System Hook

Background: DEDS is used to exchange files between Our Client and outside world. It is running on Sun v480 server OS 5.8. The files can come into or go out from various directories configured for various interfaces and come from both Our Client side as well as outside world. Requirement: ... (0 Replies)
Discussion started by: kdhana
0 Replies

8. Linux

would like to hook up linux system to another computer!

I have desktop with both windows and fedora core 2 installed on it which I have also hooked up to my psion 5mx palm device that is stored in the windows drive... and i just access the files by mounting them onto my linux drive.. now I have a laptop too .. with the same directories as the linux... (7 Replies)
Discussion started by: moxxx68
7 Replies
Login or Register to Ask a Question