Issue 58852 - UNXSUFFIX should be defined by the makefiles
Summary: UNXSUFFIX should be defined by the makefiles
Status: CONFIRMED
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 680m141
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-04 13:01 UTC by sparcmoz
Modified: 2013-02-07 21:54 UTC (History)
3 users (show)

See Also:
Issue Type: TASK
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description sparcmoz 2005-12-04 13:01:19 UTC
UNXSUFFIX was set up by issue 16860 to help with MACOSX but the definition is
hardcoded in scp2 and now there are two flavours of MACOSX. It would be better
for all platforms to take the definition from the solenv/inc/unx*mk files.

Notice this usage:
inc/macros.inc:    #define LIBNAME(name) 
STRING(CONCAT5(lib,name,OFFICEUPD,DLLSUFFIX,UNXSUFFIX))

DLLSUFFIX is passed in on the command line by -DDLLSUFFIX but UNXSUFFIX is hard
coded thus:
#ifdef UNX
    #ifdef MACOSX
        #define UNXSUFFIX .dylib
    #else
        #define UNXSUFFIX .so
    #endif
#endif

But .dylib and .so are already defined in solenv/inc/unx*mk for example:
DLLPOST=.so

By copying how DLLSUFFIX is handled it may be possible to do this:
(a) remove the #define UNXSUFFIX from scp2
(b) patch solenv/inc/pstrules.mk as follows:
--- pstrules.mk 8 Sep 2005 09:38:11 -0000       1.37
+++ pstrules.mk 4 Dec 2005 12:52:44 -0000
@@ -201,7 +201,7 @@
 .IF "$(OS)"=="SOLARIS"
        cpp.lcc -+ -P $(CDEFS) $(SCPDEFS) -DDLLSUFFIX=$(DLLSUFFIX) -I. -I$(INC)
-I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(*:b).scp >
$(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
 .ELSE
-       cpp.lcc -+ -P $(CDEFS) $(SCPDEFS) -DDLLSUFFIX=$(DLLSUFFIX) -I. -I$(INC)
-I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(*:b).scp >
$(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
+       cpp.lcc -+ -P $(CDEFS) $(SCPDEFS) -DDLLSUFFIX=$(DLLSUFFIX)
-DUNXSUFFIX=$(DLLPOST) -I. -I$(INC) -I$(INCLOCAL) -I$(INCGUI) -I$(INCCOM)
$(SOLARINC) $(*:b).scp > $(MISC)$/{$(subst,$(@:d:d:d), $(@:d:d))}$/$(*:b).pre
 .ENDIF
 .ENDIF
 .IF "$(common_build_srs)"!=""

But need to check if this has any side effects, and have all platforms set
DLLPOST correctly?
Comment 1 pavel 2005-12-04 22:08:17 UTC
ause, this is one for you ;-)
Comment 2 hjs 2005-12-06 16:34:15 UTC
DLLPOST is used for all platforms to assemble shared library targets. so i
assume it set...

your proposed change is fine if you remove the "special handling" for SOLARIS :)

#i58965# gives an impression where i would like to see scp2 moving to...