From m.sea...@infracaninophile.co.uk Wed Sep 26 14:21:51 2012

        On 26/09/2012 13:06, Anton Shterenlikht wrote:
        > I was updating my port until I got to
        > 
        > make: don't know how to make install. Stop
        > *** [do-install] Error code 2
        > 
        > and I realised that I don't really understand
        > the sequence of commands involved in "make install".
        > I've looked through the porter's handbook,
        > but still not clear.
        > 
        > I see lots of post-install targets in
        > Makefiles, but never just "install".
        > I presume it should be pulled into by
        > .include <bsd.port.mk>
        > 
        > Still, if I have a set of source files,
        > generated object files, and just one
        > executable I want to install, I probably
        > have to specify somewhere in the Makefile
        > the name of this executable, right?
        > 
        > Or are PLIST_FILES and PLIST_DIRS used > to let make know what to 
install?
        The ports 'make install' generally does one of two things: either it
        runs appropriate make install commands from $WRKDIR -- ie. what the
        ported software provides itself -- or it has a list of files,
        directories etc. from within $WRKDIR which it copies into place itself,

How do I specify this list?

        which is usually only done if the ported software doesn't provide its
        own installation routines.  As I recall, if you don't provide an
        explicit install target yourself, the default is to run 'make install'
        from $WRKDIR.

        PLIST_FILES, PLIST_DOCS or the pkg-plist file don't tell the ports what
        to install.  Instead, they document what the installation process should
        be installing, and so what files to include in a pkg tarball and what to
        delete at pkg deinstallation time.  Hence the effort required to make
        sure your plist is accurate.

Ok, I have in my port, astro/xearth
(inherited when I took over the maintainership):

post-install:
        @${INSTALL_MAN} ${WRKSRC}/xearth.man ${MANPREFIX}/man/man1/xearth.1
        @${MKDIR} ${PREFIX}/lib/X11/xearth
# Copy the list of FreeBSD sites & committers locations
.for marker in freebsd.committers.markers freebsd.submitters.markers 
freebsd.ftp.markers
        @${INSTALL_DATA} ${FILESDIR}/${marker} ${PREFIX}/lib/X11/xearth
.endfor

So, looking at this, the xearth binary
is installed by running "make install"
from under $WRKDIR.
Then post-install installs the man page,
creates the directory to hold a few
extra files, and copies the files there.

I'm thinking about having all install
related commands in one place. So is
it a good idea to move all post-install
commands as a part of the software's
own Makefile install target?

Or alternatively, I'd like to move
the installation of the binary to
the port's Makefile, just not sure
where and how to specify it.
Presumably this should come instead
of post-install?

Thanks
Anton

_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to