diff options
author | sos <sos@FreeBSD.org> | 1998-05-25 14:42:22 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 1998-05-25 14:42:22 +0000 |
commit | e93c797887b52fcac9eed98a646e0c11777f30c9 (patch) | |
tree | df8d1165a372161c4b9c6ed3737fa1fd9a048aab /usr.bin | |
parent | 60d78a8916a3ac6d725e00bd64b76c06ead142ad (diff) | |
download | FreeBSD-src-e93c797887b52fcac9eed98a646e0c11777f30c9.zip FreeBSD-src-e93c797887b52fcac9eed98a646e0c11777f30c9.tar.gz |
Make objformat DTRT when in the make world environment.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/objformat/Makefile | 16 | ||||
-rw-r--r-- | usr.bin/objformat/objformat.c | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/usr.bin/objformat/Makefile b/usr.bin/objformat/Makefile index d9ba31b..e25e3f5 100644 --- a/usr.bin/objformat/Makefile +++ b/usr.bin/objformat/Makefile @@ -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> diff --git a/usr.bin/objformat/objformat.c b/usr.bin/objformat/objformat.c index 92440d6..d353548 100644 --- a/usr.bin/objformat/objformat.c +++ b/usr.bin/objformat/objformat.c @@ -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) { |