mirror of
https://github.com/gryf/wmaker.git
synced 2026-02-05 07:45:50 +01:00
wrlib: generate automatically the list of symbols to keep from the API header
Instead of having to maintain manually the map file for LD with the list of symbols that we want to keep in the WRaster library (the purpose is to hide internal symbols), this patch implements a script that parses the public API header and extracts automatically the list of names that are supposed to be visible to the user. The goal is to reduce possible human errors, like for example the function RCombineAlpha that was forgotten from the list, yet still keep the map file feature which is considered a good practice (it reduces the risk for name clash and the risk of mis-use of internal stuff from the library). Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
d12b647069
commit
d458304610
@@ -5,14 +5,16 @@ DIST_SUBDIRS = $(SUBDIRS) tests
|
||||
|
||||
AUTOMAKE_OPTIONS =
|
||||
|
||||
EXTRA_DIST = tests libwraster.map get-wraster-flags.in
|
||||
EXTRA_DIST = tests get-wraster-flags.in
|
||||
|
||||
lib_LTLIBRARIES = libwraster.la
|
||||
|
||||
libwraster_la_LDFLAGS = -version-info @WRASTER_VERSION@
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
libwraster_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libwraster.map
|
||||
libwraster_la_LDFLAGS += -Wl,--version-script=libwraster.map
|
||||
EXTRA_libwraster_la_DEPENDENCIES = libwraster.map
|
||||
CLEANFILES = libwraster.map
|
||||
endif
|
||||
|
||||
bin_SCRIPTS = get-wraster-flags
|
||||
@@ -101,3 +103,8 @@ get-wraster-flags: get-wraster-flags.in Makefile
|
||||
-e 's#$${XLIBS}#$(XLIBS)#;' < $(abs_srcdir)/get-wraster-flags.in > $@
|
||||
@chmod 755 $@
|
||||
|
||||
if HAVE_LD_VERSION_SCRIPT
|
||||
libwraster.map: $(include_HEADERS) $(top_srcdir)/script/generate-mapfile-from-header.sh
|
||||
$(AM_V_GEN)$(top_srcdir)/script/generate-mapfile-from-header.sh \
|
||||
-n LIBWRASTER -v $(WRASTER_VERSION) $(srcdir)/$(include_HEADERS) > libwraster.map
|
||||
endif
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
/* libwraster.map - libtool symbol version script for libwraster
|
||||
* Copyright (c) 2010 Andreas Metzler
|
||||
*
|
||||
* This file is part of the Raster graphics library
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
LIBWRASTER3
|
||||
{
|
||||
global:
|
||||
RBevelImage;
|
||||
RBlurImage;
|
||||
RClearImage;
|
||||
RCloneImage;
|
||||
RCombineArea;
|
||||
RCombineAreaWithOpaqueness;
|
||||
RCombineImages;
|
||||
RCombineImagesWithOpaqueness;
|
||||
RCombineImageWithColor;
|
||||
RConvertImage;
|
||||
RConvertImageMask;
|
||||
RCopyArea;
|
||||
RCreateContext;
|
||||
RDestroyContext;
|
||||
RCreateImage;
|
||||
RCreateImageFromDrawable;
|
||||
RCreateImageFromXImage;
|
||||
RCreateXImage;
|
||||
RDestroyXImage;
|
||||
RDrawLine;
|
||||
RDrawLines;
|
||||
RDrawSegments;
|
||||
RErrorCode;
|
||||
RFillImage;
|
||||
RGetClosestXColor;
|
||||
RGetImageFileFormat;
|
||||
RGetImageFromXPMData;
|
||||
RGetPixel;
|
||||
RGetSubImage;
|
||||
RGetXImage;
|
||||
RHSVtoRGB;
|
||||
RLightImage;
|
||||
RLoadImage;
|
||||
RMakeCenteredImage;
|
||||
RMakeTiledImage;
|
||||
RMessageForError;
|
||||
ROperateLine;
|
||||
ROperateLines;
|
||||
ROperatePixel;
|
||||
ROperatePixels;
|
||||
ROperateRectangle;
|
||||
ROperateSegments;
|
||||
RPutPixel;
|
||||
RPutPixels;
|
||||
RPutXImage;
|
||||
RReleaseImage;
|
||||
RRenderGradient;
|
||||
RRenderInterwovenGradient;
|
||||
RRenderMultiGradient;
|
||||
RRetainImage;
|
||||
RRGBtoHSV;
|
||||
RRotateImage;
|
||||
RFlipImage;
|
||||
RSaveImage;
|
||||
RScaleImage;
|
||||
RShutdown;
|
||||
RSmoothScaleImage;
|
||||
RSupportedFileFormats;
|
||||
|
||||
local:
|
||||
# _edata
|
||||
# _end
|
||||
# _fini
|
||||
# _init
|
||||
# __bss_start
|
||||
# calculateCombineArea
|
||||
# contrib
|
||||
# R_CreateXImageMappedPixmap
|
||||
# RLoadGIF
|
||||
# RLoadJPEG
|
||||
# RLoadPNG
|
||||
# RLoadPPM
|
||||
# RLoadTIFF
|
||||
# RLoadXPM
|
||||
# RSaveXPM
|
||||
# _wraster_change_filter
|
||||
# WRasterLibVersion
|
||||
*;
|
||||
};
|
||||
Reference in New Issue
Block a user