1## Process this file with automake to generate Makefile.in.
2## 19990904 mortene.
3
4RegularSources = \
5	error.cpp \
6	debugerror.cpp \
7	SoDebugError.cpp \
8	SoError.cpp \
9	SoMemoryError.cpp \
10	SoReadError.cpp
11LinkHackSources = \
12	all-errors-cpp.cpp
13PublicHeaders =
14PrivateHeaders =
15ObsoleteHeaders =
16
17##$ BEGIN TEMPLATE Make-Common(errors, errors)
18# **************************************************************************
19# This template depends on the following variables having been set up before
20# its invokation.
21#
22# PublicHeaders    - header files that should be installed
23# PrivateHeaders   - source files that should be distributed, but not
24#                    installed - including source-included source files.
25# RegularSources   - source files compiled in this directory
26# LinkHackSources  - alternative source files used on -enable-compact compilation
27# ObsoletedHeaders - header files that should be removed upon installation
28
29# Everything below is autogenerated from a macro, so don't modify
30# within the Makefile.am itself. 19991201 mortene.
31
32DISTCLEANFILES = \
33	ii_files/*.ii
34
35if HACKING_COMPACT_BUILD
36BuildSources = $(LinkHackSources)
37ExtraSources = $(RegularSources)
38else
39BuildSources = $(RegularSources)
40ExtraSources = $(LinkHackSources)
41endif
42
43if BUILD_WITH_MSVC
44noinst_LIBRARIES = errors.lst
45else
46if HACKING_DYNAMIC_MODULES
47lib_LTLIBRARIES = liberrors@SUFFIX@LINKHACK.la
48else
49noinst_LTLIBRARIES = liberrors.la
50endif
51endif
52
53# Remove any linklibraries detected by configure, as they are not
54# needed in the submodules -- only in the toplevel libCoin build.
55LIBS =
56
57DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include $(ExtraIncludeDirs) -I$(top_builddir)/src -I$(top_srcdir)/src
58
59# header installation
60if MAC_FRAMEWORK
61liberrorsincdir = $(MAC_FRAMEWORK_PREFIX)/$(MAC_FRAMEWORK_NAME).framework/Versions/$(MAC_FRAMEWORK_VERSION)/Headers/errors
62# hack to change libdir value when installing Mac OS X compiler framework
63lib@nop@dir = $(MAC_FRAMEWORK_PREFIX)/$(MAC_FRAMEWORK_NAME).framework/Versions/$(MAC_FRAMEWORK_VERSION)/Libraries
64else
65liberrorsincdir = $(includedir)/Inventor/errors
66endif
67liberrorsinc_HEADERS = $(PublicHeaders)
68
69liberrors_la_SOURCES = $(BuildSources)
70EXTRA_liberrors_la_SOURCES = \
71	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)
72
73liberrors@SUFFIX@LINKHACK_la_SOURCES = $(BuildSources)
74EXTRA_liberrors@SUFFIX@LINKHACK_la_SOURCES = \
75	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)
76
77errors_lst_SOURCES = $(BuildSources)
78EXTRA_errors_lst_SOURCES = \
79	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)
80
81# this rule causes a make warning, so we remove it when it is not in use
82errors.lst: Makefile $(errors_lst_OBJECTS)
83	@echo "Linking errors.lst..."; \
84	rm -f $@; touch $@; \
85	for i in $(errors_lst_OBJECTS); do echo $$i >>$@; done
86
87install-liberrorsincHEADERS: $(liberrorsinc_HEADERS)
88	@$(NORMAL_INSTALL)
89	@if test x"$(liberrorsinc_HEADERS)" = x""; then :; else \
90	  echo " $(mkinstalldirs) $(DESTDIR)$(liberrorsincdir)"; \
91	  $(mkinstalldirs) $(DESTDIR)$(liberrorsincdir); \
92	fi
93	@list='$(liberrorsinc_HEADERS)'; for p in $$list; do \
94	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
95	  f="`echo $$p | sed -e 's|^.*/||'`"; \
96	  src="$$d$$p"; dst="$(DESTDIR)$(liberrorsincdir)/$$f"; \
97	  if cmp -s "$$src" "$$dst"; then :; else \
98	    echo " $(INSTALL_HEADER) $$src $$dst"; \
99	    $(INSTALL_HEADER) "$$src" "$$dst" || exit 1; \
100	  fi \
101	done
102	@list='$(ObsoletedHeaders)'; for f in $$list; do \
103	  file="$(DESTDIR)$(liberrorsincdir)/$$f"; \
104	  if test -x "$$file"; then \
105	    echo " rm -f $$file"; \
106	    rm -f "$$file"; \
107	  fi \
108	done; \
109	:
110
111if MACOSX
112# When using --enable-hacking, the user tends to manually replace some
113# of the installed libraries by symlinks back to the build directory.
114# But Mac OS X's install program refuses to overwrite symlinks => we
115# have to explicitly remove existing symlinks before installation.
116install-exec-local:
117	@for file in $(DESTDIR)$(lib@nop@dir)/liberrors@SUFFIX@LINKHACK*.dylib; do \
118	  if test -L "$$file"; then \
119	    rm -f "$$file"; \
120	  fi \
121	done;
122else
123install-exec-local:
124endif
125
126install-symlinks:
127	@echo "Creating symlink to liberrors@SUFFIX@LINKHACK*@LIBEXT@*"; \
128        for dir in $(SUBDIRS) ; do \
129          (cd $$dir; $(MAKE) install-symlinks;) \
130        done ; \
131        here=`pwd`; \
132	(cd $(DESTDIR)$(lib@nop@dir); \
133	for file in liberrors@SUFFIX@LINKHACK*@LIBEXT@*; do \
134	  ln -sf "$$here/.libs/$$file" "$$file"; \
135	done; \
136        cd -; )
137##$ END TEMPLATE Make-Common
138