LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-15-2017, 10:27 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
How To: installing the man page using a makefile.


I got it to install, it is in
Code:
/usr/local/share/man/man1                                       
mh5000.1
But it does not work like that. The real ones are in /usr/man/man1/ and in zip form. .1.gz

the ftp://ftp.gnu.org/old-gnu/Manuals/ma...r/make_14.html page says,
Quote:
`mandir'

The top-level directory for installing the man pages (if any) for this package.
It will normally be `/usr/local/man', but you should write it as `$(prefix)/man'.
(If you are using Autoconf, write it as `@mandir@'.)
The makefile I am using uses man_dir so changing my makefile from , to this.
Code:
//config.mk
PREFIX ?= /usr/local
# Directories for manuals, executables, docs, data, etc.
main_dir = ${DESTDIR}${PREFIX}

//from this:
#man_dir = ${main_dir}/share/man
// to this:
man_dir = /usr/man  

// in Makefile I added gzip the man file then copy it over 

install:install-man install-bin

//from this: where it puts it in the /usr/local/share/man/man1
// which is the only man page in there is mine. so I do not know
// why that doc says to put anything man page there at all. 

install-man:
	@echo installing manuals to ${man_dir}
	@mkdir -p ${man_dir}/man1
	@cp man/mh5000.1 ${man_dir}/man1
	@chmod 644 ${man_dir}/man1/mh5000.1


// to this
install-man:
	@echo installing manuals to ${man_dir}
	@mkdir -p ${man_dir}/man1
	@gzip man/mh5000.1 <----- here
	@cp man/mh5000.1.gz ${man_dir}/man1 <-- here
	@chmod 644 ${man_dir}/man1/mh5000.1.gz <- here
that works on my Slackware system, but will it work on the rest of the Linux worlds systems?

(this is just a copy of another programs make file and config.mk with the program name and other changes made to reflect mine so I do not know why theirs installed their man page where it is suppose to go and mine did not without having to make them changes to make it do so. )
 
Old 09-16-2017, 07:44 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
You could have a configure step to set directory paths using some tool like automake.
 
Old 09-16-2017, 08:50 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by smallpond View Post
You could have a configure step to set directory paths using some tool like automake.
that is for configure to be added is it not?
Code:
 > automake
automake: error: 'configure.ac' is required
requires me to have to write another file to get that to work. I don't think a configure file is needed. make works fine here.

I just do not see the way behind this makefile, it installs properly with the app I got it from and it is not that hard to figure out what to leave in and what to take out.

yet it is not installing in the same directories as it did using the same patten or method of telling it where to install. That part was left untouched. still it installed it elsewhere. not into ../local/man but into local/share/man, where their isn't any man dir in there.

I'll be reading more up on it and testing it when I get time to. See if I can find the snag because there really isn't that much added to the makefile to do.

I was just wondering if I left it as is it'd still work on other systems.

Last edited by BW-userx; 09-16-2017 at 08:59 AM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
man page is not found although $MANPATH and man.conf changed Abbraxas Linux - Newbie 3 09-05-2011 06:40 PM
man/Makefile.am:11: `%'-style pattern rules are a GNU make extension aibutter Linux - Networking 3 06-24-2011 07:03 AM
Installing a particular man page gregorian Linux - Newbie 5 09-09-2009 12:03 PM
man alsamixer not showing the man page nosaku Slackware 1 12-20-2004 08:52 AM
man page? chandan Linux - Newbie 1 07-16-2003 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:30 PM.

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