Issue 8234 - scp - some files do not compile
Summary: scp - some files do not compile
Status: CLOSED WONT_FIX
Alias: None
Product: porting
Classification: Code
Component: code (show other issues)
Version: 643
Hardware: SGI IRIX
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: nickb
QA Contact: issues@porting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-11 05:17 UTC by nickb
Modified: 2010-03-29 21:16 UTC (History)
1 user (show)

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


Attachments
As mentioned in the above comment (3.95 KB, patch)
2002-10-11 05:20 UTC, nickb
no flags Details | Diff
scp/source/ookde/files_kde.par - should be in sync with makefile.mk (610 bytes, patch)
2002-10-11 05:27 UTC, nickb
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description nickb 2002-10-11 05:17:02 UTC
scp/source/javafilter/module_javafilter.scp - adds bad ','s depending on certain
ifdefs

scp/source/office/files.scp - uses '#' as a comment, should be '//'
Comment 1 nickb 2002-10-11 05:20:43 UTC
Created attachment 3126 [details]
As mentioned in the above comment
Comment 2 nickb 2002-10-11 05:24:56 UTC
Also, in scp/source/ookde:
In the makefile:
.IF "$(GUI)"=="UNX"
PARFILES=\
    some par files
.ENDIF

However, in files_kde.par
#if defined(LINUX) || defined(FREEBSD) || defined(NETBSD)

#endif

They should be the same.
Comment 3 nickb 2002-10-11 05:27:21 UTC
Created attachment 3127 [details]
scp/source/ookde/files_kde.par - should be in sync with makefile.mk
Comment 4 nickb 2002-10-31 00:43:59 UTC
Confirming Issue.
Comment 5 Martin Hollmichel 2003-02-04 10:22:02 UTC
mh->is: please review
Comment 6 ingo.schmidt-rosbiegal 2003-02-10 11:48:29 UTC
Hmm, I have some problems with the following construction:

 Module GID_MODULE_OPTIONAL_JAVAFILTER
         MOD_NAME_DESC(MODULE_OPTIONAL_JAVAFILTER);
         ParentID = GID_MODULE_OPTIONAL;
-        Files = ( GID_FILE_LIB_XMLFA,
+        Files = ( GID_FILE_LIB_XMLFA
 #ifdef SOLAR_JAVA
-                  GID_FILE_JAR_XFLATXML,
+                  , GID_FILE_JAR_XFLATXML,
                  GID_FILE_JAR_HTMLSOFF,
                   GID_FILE_JAR_XMERGE,
                   GID_FILE_JAR_XMERGEBRIDGE,
@@ -39,9 +39,9 @@


Of course this will work, but this is not the usual scp behavior in 
OOo 1.0.X (this would be the way of defining modules in my new scp, 
which would be included for OOo 2.0 (but probably will never be 
included))
Concerning to the old scp structure, the linker looks for the 
definitions of the GIDs, for example for the GID_FILE_JAR_XFLATXML. 
If this GID is not found, then the GID is removed from the module 
automatically. Therefore we normally include the complete definition 
block of the gid into the #ifdef:

#ifdef SOLAR_JAVA

File GID_FILE_JAR_XFLATXML
   Name = ....
End

#endif

If you make the definition in this way, the GID is automatically 
removed from the module, if SOLAR_JAVA is defined. Therefore it is 
superfluous to take care of the correct comma settings in the module 
definition, which is very unusual in this old scp schema.
Therefore I would prefer to put the File definitions and not the 
module definitions into #ifdef SOLAR_JAVA
Comment 7 ingo.schmidt-rosbiegal 2003-02-10 11:53:45 UTC
Nick, can you please make your changes in the described way? Then 
the scplinker will take care of the correct comma settings.
Comment 8 nickb 2003-02-11 00:29:42 UTC
I'm not sure I understand. All I did was move the comma, so it would
compile without SOLAR_JAVA (without this change I got errors).

Are you suggesting putting the whole module in #ifdef's? Or just the
file section?
eg
#ifdef SOLAR_JAVA

Module GID_MODULE_OPTIONAL_JAVAFILTER
        MOD_NAME_DESC(MODULE_OPTIONAL_JAVAFILTER);
        ParentID = GID_MODULE_OPTIONAL;
        Files = ( GID_FILE_LIB_XMLFA,
                  GID_FILE_JAR_XFLATXML,
                  GID_FILE_JAR_HTMLSOFF,
                  GID_FILE_JAR_XMERGE,
                  GID_FILE_JAR_XMERGEBRIDGE,
                  GID_FILE_JAR_DOCBOOK,
                  GID_FILE_JAR_HTMLSOFF
                );      
        Minimal = NO;
        Default = NO;
        Styles = ( );
End
#else
Module GID_MODULE_OPTIONAL_JAVAFILTER
        MOD_NAME_DESC(MODULE_OPTIONAL_JAVAFILTER);
        ParentID = GID_MODULE_OPTIONAL;
        Files = ( GID_FILE_LIB_XMLFA );      
        Minimal = NO;
        Default = NO;
        Styles = ( );
End

#endif

I don't know anything about scp, I just saw errors and fixed them.
Please give me an example, and I can make the changes as you suggest.

Thanks! :-)
Comment 9 ingo.schmidt-rosbiegal 2003-02-20 16:03:54 UTC
Hi Nick,

as I described above, do not use any 
#ifdef SOLAR_JAVA 
in the module block. Just leave it as it is, without the #ifdef
All you need to do, is to put the definition of the files in an #ifdef
block. For example

#ifdef SOLAR_JAVA

File GID_FILE_JAR_XFLATXML
   Name = ....
End

#endif

If you make it this way, the preprocessor removes the File definitions
from the project if SOLAR_JAVA is not set. And if the file definitions
are missing, then the linker will remove the GID_FILE_JAR_XFLATXML
from the module. And the linker will take care of the correct comma
settings. That is all. Just make the module definition without #ifdef :

Module GID_MODULE_OPTIONAL_JAVAFILTER
        MOD_NAME_DESC(MODULE_OPTIONAL_JAVAFILTER);
        ParentID = GID_MODULE_OPTIONAL;
        Files = ( GID_FILE_LIB_XMLFA,
                  GID_FILE_JAR_XFLATXML,
                  GID_FILE_JAR_HTMLSOFF,
                  GID_FILE_JAR_XMERGE,
                  GID_FILE_JAR_XMERGEBRIDGE,
                  GID_FILE_JAR_DOCBOOK,
                  GID_FILE_JAR_HTMLSOFF
                );      
        Minimal = NO;
        Default = NO;
        Styles = ( );
End

and all files defintions with an #ifdef:

#ifdef SOLAR_JAVA

File GID_FILE_JAR_XFLATXML
   Name = ....
   ...
End

File GID_FILE_JAR_HTMLSOFF,
   Name = ....
   ...
End

File GID_FILE_JAR_XMERGE,
   Name = ....
   ...
End

File GID_FILE_JAR_XMERGEBRIDGE,
   Name = ....
   ...
End

File GID_FILE_JAR_DOCBOOK,
   Name = ....
   ...
End

File GID_FILE_JAR_HTMLSOFF
   Name = ....
   ...
End

#endif





Comment 10 nickb 2003-03-16 23:04:15 UTC
Added milestone
Comment 11 nickb 2003-03-16 23:09:13 UTC
Accepting.
Comment 12 nickb 2003-04-03 01:55:37 UTC
Removing keyword
Comment 13 caolanm 2010-03-29 21:16:04 UTC
per issue 106845 sb removed the partial irix port, so this doesn't make sense in
isolation anymore
Comment 14 caolanm 2010-03-29 21:16:36 UTC
closing