On 05/02/2014 03:17 PM, John E. Malmberg wrote: > Sounds reasonable. I have not used image libraries in user mode code so > was not aware that they were also .olb.
Hmm, the VMS linker uses imagelib.olb and you probably linked against shareable images from that library. So you may talk about something else. To me it seems convenient to use image libraries. Anyway, appended is a patch to the suggested patch for default.c. It implements checking for the VMS libraries within make, using make functions. Some notes: To me it looks OK to use this complex make function calls. Maybe it can be simplified. The other option is to write a new VMS specific function, like $(vms_create_library LIBRARY,MEMBER), which expands to the "if f$search ...". I'm not sure I understand why the previous code has the 'f$edit(...,"LOWERCASE")'. My change doesn't really LOWERCASE the suffix, but it works on all lower- and uppercase suffixes. On intermediate shareable images, - as already said - they should not be removed. Removing it showed after I created an image library and used the then incorrect default rule for object libraries to insert a (main) image into that image library. But there is no default rule for creating shareable images. So one has to write an implicit rule, as I did in a previous example. And then one has to add the %.exe to the .PRECIOUS target, which I didn't. --- prev/default.c 2014-05-02 02:07:35.000000000 +0200 +++ changed/default.c 2014-05-03 00:17:15.000000000 +0200 @@ -57,18 +57,16 @@ { #ifdef VMS { "(%)", "%", - "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".tlb\" then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/TEXT $@\n" - "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".hlb\" then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/HELP $@\n" - "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".mlb\" then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/MACRO $@\n" - "@if (f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".olb\") .and. (f$$edit(\"$(suffix $<)\",\"LOWERCASE\") .eqs. \".exe\") then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/SHARE $@\n" - "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".a\" then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/OBJECT $@\n" - "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".olb\" then " - "if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/OBJECT $@\n" + "@if f$$search(\"$@\") .eqs. \"\" then $(LIBRARY)/CREATE/" + "$(or " + "$(patsubst %,TEXT,$(filter %.tlb %.TLB,$@))," + "$(patsubst %,HELP,$(filter %.hlb %.HLB,$@))," + "$(patsubst %,MACRO,$(filter %.mlb %.MLB,$@))," + "$(and " + "$(patsubst %,SHARE,$(filter %.olb %.OLB,$@))," + "$(patsubst %,SHARE,$(filter %.exe %.EXE,$<)))," + "OBJECT)" + " $@\n" "$(AR) $(ARFLAGS) $@ $<" }, #else _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make