Make objformat DTRT when in the make world environment.

This commit is contained in:
Søren Schmidt 1998-05-25 14:42:22 +00:00
parent 7ac237e80f
commit 8d2cfc044c
2 changed files with 14 additions and 4 deletions

View file

@ -2,7 +2,11 @@
PROG= objformat
NOMAN= not yet
CFLAGS+= -DMAIN
CFLAGS+= -DMAIN -DROOTDIR=\"${DESTDIR}/usr/libexec/\"
beforeinstall:
$(CC) -DMAIN -DROOTDIR=\"${DESTDIR}/usr/libexec/\" \
${.CURDIR}/objformat.c -o ${.OBJDIR}/objformat
.if ${BINFORMAT} == elf
CFLAGS+= -DFREEBSD_ELF
@ -10,7 +14,13 @@ CFLAGS+= -DFREEBSD_ELF
CFLAGS+= -DFREEBSD_AOUT
.endif
# LINKS+= /usr/bin/objformat /usr/bin/as
# LINKS+= /usr/bin/objformat /usr/bin/ld
LINKS+= /usr/bin/objformat /usr/bin/ar
LINKS+= /usr/bin/objformat /usr/bin/as
LINKS+= /usr/bin/objformat /usr/bin/ld
LINKS+= /usr/bin/objformat /usr/bin/nm
LINKS+= /usr/bin/objformat /usr/bin/ranlib
LINKS+= /usr/bin/objformat /usr/bin/size
LINKS+= /usr/bin/objformat /usr/bin/strings
LINKS+= /usr/bin/objformat /usr/bin/strip
.include <bsd.prog.mk>

View file

@ -138,7 +138,7 @@ main(int argc, char **argv)
/* 'make world' glue */
objformat_path = getenv("OBJFORMAT_PATH");
if (objformat_path == NULL)
objformat_path = "/usr/libexec";
objformat_path = ROOTDIR;
path = strdup(objformat_path);
if (objformat_aout) {