summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1999-09-10 20:51:59 +0000
committerjulian <julian@FreeBSD.org>1999-09-10 20:51:59 +0000
commitbe0f1c4ed24ca292e4cda9b1c25125ad0a18a7fb (patch)
treec2a52c6163f917180b90305ee8aabc74382b4584 /usr.bin/make
parentae7b0fea4bbf1c14974a7be119cf39ed116dd10d (diff)
downloadFreeBSD-src-be0f1c4ed24ca292e4cda9b1c25125ad0a18a7fb.zip
FreeBSD-src-be0f1c4ed24ca292e4cda9b1c25125ad0a18a7fb.tar.gz
Allow 'make' to check out elements within archive libraries.
"Make no longer properly parses archive files, so using archive members as make targets, as described in PSD:12 section 4.2, does not work." Really should be merged into 3.3 before we ship if we can.. it's a trivial fix. PR: bin/13039, bin/10274 Submitted by: Mikko Tyolajarvi mikko@dynas.se
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c4
-rw-r--r--usr.bin/make/config.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 5397e27..5e2b520 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -123,7 +123,7 @@ static int ArchFindArchive __P((ClientData, ClientData));
static void ArchFree __P((ClientData));
static struct ar_hdr *ArchStatMember __P((char *, char *, Boolean));
static FILE *ArchFindMember __P((char *, char *, struct ar_hdr *, char *));
-#if defined(__svr4__) || defined(__SVR4)
+#if defined(__svr4__) || defined(__SVR4) || defined(__ELF__)
#define SVR4ARCHIVES
static int ArchSVR4Entry __P((Arch *, char *, size_t, FILE *));
#endif
@@ -478,7 +478,7 @@ ArchStatMember (archive, member, hash)
* the comparisons easier...
*/
cp = strrchr (member, '/');
- if (cp != NULL)
+ if ((cp != NULL) && (strcmp(member, RANLIBMAG) != 0))
member = cp + 1;
ln = Lst_Find (archives, (ClientData) archive, ArchFindArchive);
diff --git a/usr.bin/make/config.h b/usr.bin/make/config.h
index 5732247..9d97eb5 100644
--- a/usr.bin/make/config.h
+++ b/usr.bin/make/config.h
@@ -114,4 +114,8 @@
# ifndef RANLIBMAG
# define RANLIBMAG "__.SYMDEF"
# endif
+#else
+# ifndef RANLIBMAG
+# define RANLIBMAG "/"
+# endif
#endif
OpenPOWER on IntegriCloud