~vcs-imports/libiconv/trunk

« back to all changes in this revision

Viewing changes to libcharset/Makefile.devel

  • Committer: Bruno Haible
  • Date: 2023-09-06 16:08:35 UTC
  • Revision ID: git-v1:bacf33185644481aced2d0c6c57f466b8267a3cb
Don't export symbols from static MSVC .obj files.

Suggested by Dmitry Bely <dmitry.bely@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnu-libiconv/2023-08/msg00002.html>.

* include/export.h: Add a copyright notice. Set LIBICONV_DLL_EXPORTED to
empty on MSVC when DLL_EXPORT is not defined.
* Makefile.devel (include/iconv.h.build.in): Filter out the second
copyright notice.
* configure.ac (DLL_VARIABLE): Test DLL_EXPORT, not _DLL.
* lib/relocatable.h: From gnulib:
(RELOCATABLE_DLL_EXPORTED): Don't use __declspec(dllexport) when
creating static .obj files with MSVC.
* libcharset/include/export.h: Add a copyright notice. Set
LIBCHARSET_DLL_EXPORTED to empty on MSVC when DLL_EXPORT is not defined.
* libcharset/Makefile.devel (include/libcharset.h.build.in,
include/localcharset.h.build.in): Filter out the second copyright
notice.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
        touch config.h.in
26
26
 
27
27
include/libcharset.h.build.in : include/libcharset.h.in include/export.h
28
 
        sed -e 's/extern \([^"]\)/extern LIBCHARSET_DLL_EXPORTED \1/' \
29
 
            -e '/#define _LIBCHARSET_H/r include/export.h' \
30
 
          < $< > $@
 
28
        cat $< \
 
29
        | sed -e 's/extern \([^"]\)/extern LIBCHARSET_DLL_EXPORTED \1/' \
 
30
              -e '/#define _LIBCHARSET_H/r include/export.h' \
 
31
        | sed -e '/#define _LIBCHARSET_H/,/[*][/]$$/{/#define _LIBCHARSET_H/!d;}' \
 
32
          > $@
31
33
 
32
34
include/localcharset.h.build.in : include/localcharset.h.in include/export.h
33
 
        sed -e 's/extern \([^"]\)/extern LIBCHARSET_DLL_EXPORTED \1/' \
34
 
            -e '/#define _LOCALCHARSET_H/r include/export.h' \
35
 
          < $< > $@
 
35
        cat $< \
 
36
        | sed -e 's/extern \([^"]\)/extern LIBCHARSET_DLL_EXPORTED \1/' \
 
37
              -e '/#define _LOCALCHARSET_H/r include/export.h' \
 
38
        | sed -e '/#define _LOCALCHARSET_H/,/[*][/]$$/{/#define _LOCALCHARSET_H/!d;}' \
 
39
          > $@
36
40
 
37
41
totally-clean : force
38
42
        rm -f autoconf/aclocal.m4 configure config.h.in include/libcharset.h.build.in include/localcharset.h.build.in