NetBSD: "make install" with bsd.*.mk scripts: How to automatically create non-existing directories

StackOverflow https://stackoverflow.com/questions/21499745

質問

On a NetBSD system I have a makefile with no install target. Included makefiles are

bsd.xconf.mk
bsd.prog.mk
bsd.xorg.mk

The following relevant variables are set

PROG
BINDIR
MANDIR
MAN

When I type

make install

PROG is installed in BINDIR and files in MAN are installed in MANDIR. But if BINDIR or MANDIR do not exist they are not created.

What do I need to specify in the Makefile for creating non-existing directories? (Of course writing a install target would work but I would like to use the automatism from the .mk scripts.)

I tried e.g. to set variables

INSTALL_MAN_DIR
INSTALLATION_DIRS

but nothing works.

役に立ちましたか?

解決

Mayby you should install it manually.

PROG = xxxxx
DESTDIR = /usr/local/test/make
BINDIR = /bin

include bsd.prog.mk

beforeinstall:
    ${INSTALL} -d $(DESTDIR)$(BINDIR)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top