-AUTOMAKE_OPTIONS = foreign
-DISTCLEANFILES= *.orig *.rej *~ *.bak core
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-noinst_LTLIBRARIES = libsupport.la
-LIBS =
-ETAGS_ARGS = --lang=c++
-BOOST_INCLUDES = -I$(top_srcdir)/boost
-INCLUDES = -I${srcdir}/../ $(BOOST_INCLUDES)
+include $(top_srcdir)/config/common.am
-EXTRA_DIST = lyxstring.C lyxstring.h regex.c lyxregex.h
+SUBDIRS = . tests
-if USE_LYXSTRING
-LYXSTRING = lyxstring.C lyxstring.h
-endif
-if USE_REGEX
-REGEX = regex.c lyxregex.h
+CLEANFILES += $(BUILT_SOURCES)
+
+EXTRA_DIST = package.C.in os_unix.C os_win32.C os_os2.C
+
+noinst_LTLIBRARIES = libsupport.la
+
+if USE_COMPRESSION
+COMPRESSION = gzstream.C gzstream.h
endif
+BUILT_SOURCES = package.C
+
+AM_CPPFLAGS = $(PCH_FLAGS) -I$(srcdir)/.. $(BOOST_INCLUDES)
+
libsupport_la_SOURCES = \
- DebugStream.C \
- DebugStream.h \
- FileInfo.C \
- FileInfo.h \
- LAssert.C \
- LAssert.h \
- LIstream.h \
- LOstream.h \
- LRegex.C \
- LRegex.h \
- LSubstring.C \
- LSubstring.h \
- StrPool.C \
- StrPool.h \
+ FileMonitor.h \
+ FileMonitor.C \
abort.C \
- atoi.C \
chdir.C \
+ convert.C \
+ convert.h \
copy.C \
- date.C \
+ copied_ptr.h \
+ cow_ptr.h \
+ debugstream.h \
+ environment.h \
+ environment.C \
+ filefilterlist.C \
+ filefilterlist.h \
+ filename.C \
+ filename.h \
filetools.C \
filetools.h \
- fmt.C \
- getUserName.C \
+ forkedcall.C \
+ forkedcall.h \
+ forkedcallqueue.C \
+ forkedcallqueue.h \
+ forkedcontr.C \
+ forkedcontr.h \
+ fs_extras.C \
+ fs_extras.h \
getcwd.C \
- kill.C \
+ $(COMPRESSION) kill.C \
+ limited_stack.h \
lstrings.C \
lstrings.h \
- lxtl.h \
lyxalgo.h \
- lyxfunctional.h \
lyxlib.h \
lyxmanip.h \
- $(LYXSTRING) lyxsum.C \
+ lyxtime.C \
+ lyxtime.h \
+ lyxsum.C \
mkdir.C \
+ os.C \
+ os.h \
+ os2_defines.h \
+ os2_errortable.h \
path.C \
path.h \
- putenv.C \
+ package.C \
+ package.h \
rename.C \
- rmdir.C \
- snprintf.h \
- snprintf.c \
- sstream.h \
- $(REGEX) syscall.C \
- syscall.h \
- syscontr.C \
- syscontr.h \
- syssingleton.C \
- translator.h \
+ socktools.C \
+ socktools.h \
+ std_istream.h \
+ std_ostream.h \
+ systemcall.C \
+ systemcall.h \
+ tempname.C \
textutils.h \
+ translator.h \
+ types.h \
+ userinfo.C \
+ userinfo.h \
unlink.C
+
+
+package.C: build_package
+
+# Solaris sed does not like spaces bewteen the ;-delimited commands
+build_package: package.C.in
+ @rm -f tmp_package ;\
+ ABS_SRCDIR=`cd $(top_srcdir) && pwd` ;\
+ ABS_BUILDDIR=`cd ../.. && pwd` ;\
+ sed "s,%LYX_DIR%,$(pkgdatadir),;\
+s,%LOCALEDIR%,$(datadir)/locale,;\
+s,%TOP_SRCDIR%,$${ABS_SRCDIR}," \
+ $(srcdir)/package.C.in > tmp_package ;\
+ if cmp -s tmp_package package.C ; then \
+ rm -f tmp_package ;\
+ else \
+ rm -f package.C ;\
+ mv tmp_package package.C ;\
+ fi