bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug #41758] VMS Make incorrectly reports archives support present.


From: h.becker
Subject: Re: [bug #41758] VMS Make incorrectly reports archives support present.
Date: Sat, 03 May 2014 11:30:49 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130519 Icedove/17.0.5

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(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/TEXT address@hidden"
-        "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".hlb\" then "
-        "if f$$search(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/HELP address@hidden"
-        "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".mlb\" then "
-        "if f$$search(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/MACRO address@hidden"
-        "@if (f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".olb\")
.and. (f$$edit(\"$(suffix $<)\",\"LOWERCASE\") .eqs. \".exe\") then "
-        "if f$$search(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/SHARE address@hidden"
-        "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".a\" then "
-        "if f$$search(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/OBJECT
address@hidden"
-        "@if f$$edit(\"$(suffix $@)\",\"LOWERCASE\") .eqs. \".olb\" then "
-        "if f$$search(\"address@hidden") .eqs. \"\" then 
$(LIBRARY)/CREATE/OBJECT
address@hidden"
+        "@if f$$search(\"address@hidden") .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)"
+         " address@hidden"
         "$(AR) $(ARFLAGS) $@ $<" },

 #else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]