XFree 4.2.1 + fontconfig-2
Alexander Gottwald
Alexander.Gottwald@informatik.tu-chemnitz.de
Sun Sep 29 20:16:00 GMT 2002
Alan Hourihane wrote:
> When you've come to a decision on the patch, post a new one so I
> can take a look and then commit it.
There's a new one.
The cygwin.rules diff includes:
- new macro SharedLibraryName
evalutes to cygName-Version.dll
- new macro ImportLibraryName
evaluates to libName-Version.dll.a
- new macro ShortImportLibraryName
evaluates to libName.dll.a
- new macro InstallLink
creates a symlink on install. Needed for symlinking ImportLibraryName()
to ShortImportLibraryName()
- new macro LinkImportLibrary
creates a link to ImportLibraryName as xc/exports/lib/libName.a
- cleaup of of old macros to use the ShareLibraryName and ImportLibraryName
macros instead of the old Concat3() composition
- added new ld option --exclude-libs All in MakeDLLProg. This should prevent
exporting of symbols which were imported from another library.
- Some macros now also need the library version to pass it to the new *Name
macros. Added rev to parameterlists.
- Installing a link libName-Version.dll.a with name libName.dll.a
The --exclude-libs ALL is needed at my system since Xft exported symbols
from Xrender. linking a program with -Xrender -lXft failed because of
duplicate symbols. Since we're using spec files to specify which symbols
have to be exported, --exclude-libs ALL should be no problem.
The second path changes the order of the libraries. It is now -lXrender
-lXext -lX11. This fixes an error where some symbols from libX11 were not
found when the linker resolved symbols from libXrender.
bye
ago
--
Alexander.Gottwald@informatik.tu-chemnitz.de
http://www.gotti.org ICQ: 126018723
-------------- next part --------------
Index: config/cf/cygwin.tmpl
===================================================================
RCS file: /cvs/xc/config/cf/cygwin.tmpl,v
retrieving revision 3.10
diff -u -r3.10 cygwin.tmpl
--- config/cf/cygwin.tmpl 2002/09/26 08:18:34 3.10
+++ config/cf/cygwin.tmpl 2002/09/28 14:56:50
@@ -34,7 +34,7 @@
#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
#define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
#define SharedXrandrReqs $(LDPRELIB) $(XLIB)
-#define SharedXcursorReqs $(LDPRELIB) $(XLIB) $(XRENDERLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
#ifndef FixupLibReferences
-------------- next part --------------
Index: cygwin.rules
===================================================================
RCS file: /cvs/xc/config/cf/cygwin.rules,v
retrieving revision 3.19
diff -u -r3.19 cygwin.rules
--- cygwin.rules 2002/04/15 09:22:33 3.19
+++ cygwin.rules 2002/09/28 15:06:06
@@ -52,7 +52,15 @@
#define UseExportLists YES
#endif
+#define SharedLibraryName(libname, rev) \
+Concat3(cyg,libname,-$(shell echo rev|sed s=\\..*==).dll)
+#define ImportLibraryName(libname, rev) \
+Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).dll.a)
+
+#define ShortImportLibraryName(libname, rev) \
+Concat3(lib,libname,.dll.a)
+
/*
* SharedDepLibraryTarget - generate rules to create a shared library.
*/
@@ -75,22 +83,23 @@
*/
#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
-AllTarget(Concat3(lib,libname,.dll)) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
@@\
CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
@@\
@@\
@@\
-Concat3(lib,libname,.dll): deplist libname.def @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
- MakeDLL(libname,solist) @@\
- LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
- LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
+SharedLibraryName(libname,rev): deplist libname.def @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
@@\
clean:: @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
#endif /* SharedDepLibraryTarget */
@@ -116,22 +125,23 @@
*/
#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
-AllTarget(Concat3(lib,libname,.dll)) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
@@\
CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
@@\
@@\
- @@\
-Concat3(lib,libname,.dll): deplist libname.def @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
- MakeCplusplusDLL(libname,solist) @@\
- LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
- LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
@@\
-clean:: @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
+SharedLibraryName(libname,rev): deplist libname.def @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeCplusplusDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
#endif /* SharedDepCplusplusLibraryTarget */
@@ -173,22 +183,22 @@
* MakeDllProg
*/
-#define MakeDLLProg(libname,solist,prog) @@\
- prog -shared -Wl,--out-implib=Concat3(lib,libname,.a) -Wl,--enable-auto-import --def libname.def -o Concat3(lib,libname,.dll) solist $(REQUIREDLIBS)
+#define MakeDLLProg(libname,solist,prog,rev) @@\
+ prog -shared -Wl,--out-implib=ImportLibraryName(libname,rev) -Wl,--enable-auto-import --def libname.def -Wl,--exclude-libs,ALL -o SharedLibraryName(libname,rev) solist $(REQUIREDLIBS)
/*
* MakeDll
*/
-#define MakeDLL(libname,solist) @@\
- MakeDLLProg(libname,solist,$(CC))
+#define MakeDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CC),rev)
/*
* MakeCplusplusDll
*/
-#define MakeCplusplusDLL(libname,solist) @@\
- MakeDLLProg(libname,solist,$(CXX))
+#define MakeCplusplusDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CXX),rev)
@@ -197,29 +207,42 @@
*/
#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
-AllTarget(Concat3(lib,libname,.dll)) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
@@\
CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
@@\
@@\
-Concat3(lib,libname,.dll): solist libname.def @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
- MakeDLL(libname,solist) @@\
- LinkBuildLibrary(Concat3(lib,libname,.a)) @@\
- LinkBuildDLL(Concat3(lib,libname,.dll)) @@\
-clean:: @@\
- RemoveFile(LibraryTargetName(libname)) @@\
- RemoveFile(Concat3(lib,libname,.dll)) @@\
+SharedLibraryName(libname,rev): solist libname.def @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
/*
+ * InstallLink
+ */
+
+#ifndef InstallLink
+#define InstallLink(step, file, link, dest) @@\
+step:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(LN) -sf file $(DESTDIR)dest/link
+#endif
+
+/*
* InstallSharedLibrary
*/
#define InstallSharedLibrary(libname,rev,dest) @@\
-InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
-InstallTarget(install,Concat3(lib,libname,.dll),$(INSTLIBFLAGS),$(BINDIR))
+InstallTarget(install,ImportLibraryName(libname,rev),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
+InstallTarget(install,SharedLibraryName(libname,rev),$(INSTLIBFLAGS),$(BINDIR)) @@\
+InstallLink(install,ImportLibraryName(libname,rev),ShortImportLibraryName(libname,rev),$(USRLIBDIR))
/*
@@ -263,6 +286,16 @@
RemoveFile($(BUILDBINDIR)/lib) @@\
cd $(BUILDBINDIR) && $(CP) $(BUILDBINTOP)/$(CURRENT_DIR)/lib .
#endif
+
+#ifndef LinkImportLibrary
+#ifdef UseInstalled
+#define LinkImportLibrary(lib, importlib) $(_NULLCMD_)
+#else
+#define LinkImportLibrary(lib, importlib) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/importlib) @@\
+ cd $(BUILDLIBDIR) && $(LN) lib importlib
+#endif
+#endif /* LinkImportLibrary */
/*
More information about the Cygwin-xfree
mailing list