This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Platform-Specific Sourcefiles?
- From: Andrew Haley <aph at redhat dot com>
- To: Mohan Embar <gnustuff at thisiscool dot com>
- Cc: GCJ Java <java at gcc dot gnu dot org>
- Date: Fri, 10 Oct 2003 10:01:07 +0100
- Subject: Platform-Specific Sourcefiles?
- References: <XUQOIHICFBC97463ZVKIXS4X2ZTSR43.3f861aad@p733>
Mohan Embar writes:
> Hi People,
>
> I've asked this question before, but never got a response: Is it
> possible / desirable to put multipurpose, platform-specific helper
> classes in their own sourcefiles in order to avoid win32.* and
> posix.* becoming too monolithic?
It's the right thing to do.
> How would this work from a configure.in / Makefile.am standpoint?
> There must be a more elegant way to do this than to unconditionally
> compile such files and surround them by #ifdef WIN32...#endif
> guards.
It's done by using AC_SUBST; we already do it quite a lot in the
libgcj Makefile. You can also use AC_LINK_FILES (now
AC_CONFIG_LINKS). It's all in the autoconf manual.
Andrew.