I was able to get one type of archive rules working for VMS, but have
not been able to figure how to translate code from the makefiles into
the internal default pattern rules for a more general case.
The rule below works for object libraries suffixes ".a" and ".olb" only.
For VMS I have to use slightly different rules for different library
types, something like:
.a(%) : %
<tab>if f$$search("@$") .eqs. "" then $(LIBRARY)/CREA/OBJ
<tab>($LIBRARY)$(LIBFLAGS) $@ $<
.hlb(%) : %
<tab>if f$$search("@$") .eqs. "" then $(LIBRARY)/CREA/TEXT
<tab>($LIBRARY)$(LIBFLAGS) $@ $<
.mlb(%) : %
<tab>if f$$search("@$") .eqs. "" then $(LIBRARY)/CREA/MACR
<tab>($LIBRARY)$(LIBFLAGS) $@ $<
If I try to put the library suffix in a compiled rule, the rule is ignored.
Below is what I could get to work:
(Slightly modified to avoid text wrapping)
@@ -53,9 +55,15 @@
static struct pspec default_pattern_rules[] =
{
+#ifdef VMS
{ "(%)", "%",
- "$(AR) $(ARFLAGS) $@ $<" },
+ "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CRE/OBJ $@\n \
+$(LIBRARY) $(ARFLAGS) $@ $<" },
+#else
+ { "(%)", "%",
+ "$(AR) $(ARFLAGS) $@ $<" },
+#endif
/* The X.out rules are only in BSD's default set because
BSD Make has no null-suffix rules, so 'foo.out' and
'foo' are the same thing. */
@@ -78,6 +86,7 @@
So I do not understand how to get something like the above rules added
to default.c.
Regards,
-John
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make