Makefile.am revision f14f4646
1# 2# Copyright 2005 Red Hat, Inc. 3# 4# Permission to use, copy, modify, distribute, and sell this software and its 5# documentation for any purpose is hereby granted without fee, provided that 6# the above copyright notice appear in all copies and that both that 7# copyright notice and this permission notice appear in supporting 8# documentation, and that the name of Red Hat not be used in 9# advertising or publicity pertaining to distribution of the software without 10# specific, written prior permission. Red Hat makes no 11# representations about the suitability of this software for any purpose. It 12# is provided "as is" without express or implied warranty. 13# 14# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20# PERFORMANCE OF THIS SOFTWARE. 21 22bin_PROGRAMS = xedit 23noinst_LIBRARIES = liblisp.a libre.a libmp.a 24noinst_PROGRAMS = lisp/lsp lisp/re/tests 25 26# 27# libmp.a 28# 29 30libmp_a_CFLAGS = 31libmp_a_SOURCES = \ 32 lisp/mp/mp.c \ 33 lisp/mp/mp.h \ 34 lisp/mp/mpi.c \ 35 lisp/mp/mpr.c 36 37# 38# liblisp.a 39# 40 41liblisp_a_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"$(LISPDIR)\" $(PKGDEPS_CFLAGS) 42liblisp_a_SOURCES = \ 43 lisp/bytecode.c \ 44 lisp/bytecode.h \ 45 lisp/core.c \ 46 lisp/core.h \ 47 lisp/debugger.c \ 48 lisp/debugger.h \ 49 lisp/format.c \ 50 lisp/format.h \ 51 lisp/hash.c \ 52 lisp/hash.h \ 53 lisp/helper.c \ 54 lisp/helper.h \ 55 lisp/internal.h \ 56 lisp/io.c \ 57 lisp/io.h \ 58 lisp/lisp.c \ 59 lisp/lisp.h \ 60 lisp/math.c \ 61 lisp/math.h \ 62 lisp/package.c \ 63 lisp/package.h \ 64 lisp/pathname.c \ 65 lisp/pathname.h \ 66 lisp/private.h \ 67 lisp/read.c \ 68 lisp/read.h \ 69 lisp/regex.c \ 70 lisp/regex.h \ 71 lisp/require.c \ 72 lisp/require.h \ 73 lisp/stream.c \ 74 lisp/stream.h \ 75 lisp/string.c \ 76 lisp/string.h \ 77 lisp/struct.c \ 78 lisp/struct.h \ 79 lisp/time.c \ 80 lisp/time.h \ 81 lisp/write.c \ 82 lisp/write.h \ 83 lisp/xedit.c \ 84 lisp/xedit.h 85 86if NEED_UNSETENV 87liblisp_a_SOURCES += lisp/env.c 88endif 89 90# 91# libre.a 92# 93 94libre_a_CFLAGS = 95libre_a_SOURCES = \ 96 lisp/re/re.c \ 97 lisp/re/rec.c \ 98 lisp/re/re.h \ 99 lisp/re/reo.c \ 100 lisp/re/rep.h 101 102# 103# xedit 104# 105xedit_DEPENDENCIES = liblisp.a libmp.a libre.a 106xedit_CFLAGS = $(PKGDEPS_CFLAGS) -I$(top_srcdir)/lisp/re -D_BSD_SOURCE -DXEDIT 107xedit_LDADD = -L. -lre -llisp -lmp $(PKGDEPS_LIBS) -lm 108 109xedit_SOURCES = \ 110 commands.c \ 111 hash.c \ 112 hook.c \ 113 ispell.c \ 114 lisp.c \ 115 options.c \ 116 tags.c \ 117 util.c \ 118 util.h \ 119 xedit.c \ 120 xedit.h 121 122if NEED_REALPATH 123xedit_SOURCES += realpath.c 124endif 125 126if NEED_STRCASECMP 127xedit_SOURCES += strcasecmp.c 128endif 129 130if USE_XPRINT 131xedit_CFLAGS += -DINCLUDE_XPRINT_SUPPORT 132 133xedit_SOURCES += \ 134 print.c \ 135 printdialog.c \ 136 printdialog.h \ 137 printdialogprivates.h \ 138 print.h 139endif 140 141# lisp/lsp 142lisp_lsp_DEPENDENCIES = liblisp.a libre.a libmp.a 143lisp_lsp_CFLAGS = -I$(top_srcdir)/lisp/re -I$(top_srcdir)/lisp/mp -DLISP -DLISPDIR=\"@LISPDIR@\" -D_BSD_SOURCE 144lisp_lsp_LDADD = -L. -llisp -lre -lmp -lm 145lisp_lsp_SOURCES = \ 146 hash.c \ 147 lisp/lsp.c 148 149if NEED_REALPATH 150lisp_lsp_SOURCES += realpath.c 151endif 152 153if NEED_STRCASECMP 154lisp_lsp_SOURCES += strcasecmp.c 155endif 156 157# re/tests 158lisp_re_tests_DEPENDENCIES = libre.a 159lisp_re_tests_CFLAGS = -I$(top_srcdir)/lisp/re -D_BSD_SOURCE 160lisp_re_tests_LDADD = -L. -lre 161lisp_re_tests_SOURCES = lisp/re/tests.c 162 163 164# App default files (*.ad) 165 166APPDEFAULTFILES = \ 167 app-defaults/Xedit-color \ 168 app-defaults/Xedit 169 170if USE_XPRINT 171app-defaults/Xedit.ad: 172 test -d app-defaults || mkdir app-defaults 173 cp $(top_srcdir)/app-defaults/Xedit-xprint.ad app-defaults/Xedit.ad 174else 175app-defaults/Xedit.ad: 176 test -d app-defaults || mkdir app-defaults 177 cp $(top_srcdir)/app-defaults/Xedit-noxprint.ad app-defaults/Xedit.ad 178endif 179 180SUFFIXES = .ad 181 182.ad: 183 test -d app-defaults || mkdir app-defaults 184 cp $< $@ 185 186appdefaultdir = @appdefaultdir@ 187appdefault_DATA = $(APPDEFAULTFILES) 188 189CLEANFILES = $(APPDEFAULTFILES) app-defaults/Xedit.ad 190 191lispdir = $(LISPDIR) 192dist_lisp_DATA = ${srcdir}/lisp/modules/lisp.lsp \ 193 ${srcdir}/lisp/modules/xedit.lsp \ 194 ${srcdir}/lisp/modules/syntax.lsp \ 195 ${srcdir}/lisp/modules/indent.lsp 196 197progmodesdir = $(LISPDIR)/progmodes 198dist_progmodes_DATA = \ 199 ${srcdir}/lisp/modules/progmodes/auto.lsp \ 200 ${srcdir}/lisp/modules/progmodes/c.lsp \ 201 ${srcdir}/lisp/modules/progmodes/html.lsp \ 202 ${srcdir}/lisp/modules/progmodes/imake.lsp \ 203 ${srcdir}/lisp/modules/progmodes/lisp.lsp \ 204 ${srcdir}/lisp/modules/progmodes/make.lsp \ 205 ${srcdir}/lisp/modules/progmodes/man.lsp \ 206 ${srcdir}/lisp/modules/progmodes/patch.lsp \ 207 ${srcdir}/lisp/modules/progmodes/perl.lsp \ 208 ${srcdir}/lisp/modules/progmodes/python.lsp \ 209 ${srcdir}/lisp/modules/progmodes/rpm.lsp \ 210 ${srcdir}/lisp/modules/progmodes/sgml.lsp \ 211 ${srcdir}/lisp/modules/progmodes/sh.lsp \ 212 ${srcdir}/lisp/modules/progmodes/xconf.lsp \ 213 ${srcdir}/lisp/modules/progmodes/xlog.lsp \ 214 ${srcdir}/lisp/modules/progmodes/xrdb.lsp 215 216appman_PRE = xedit.man 217 218EXTRA_DIST = \ 219 app-defaults/Xedit-color.ad \ 220 app-defaults/Xedit-xprint.ad \ 221 app-defaults/Xedit-noxprint.ad \ 222 app-defaults/Xedit-sample \ 223 lisp/README \ 224 lisp/TODO \ 225 lisp/compile.c \ 226 lisp/env.c \ 227 lisp/mathimp.c \ 228 lisp/modules/psql.c \ 229 lisp/modules/x11.c \ 230 lisp/modules/xaw.c \ 231 lisp/modules/xt.c \ 232 lisp/re/README \ 233 lisp/re/tests.txt \ 234 lisp/test/hello.lsp \ 235 lisp/test/list.lsp \ 236 lisp/test/math.lsp \ 237 lisp/test/psql-1.lsp \ 238 lisp/test/psql-2.lsp \ 239 lisp/test/psql-3.lsp \ 240 lisp/test/regex.lsp \ 241 lisp/test/stream.lsp \ 242 lisp/test/widgets.lsp 243 244appmandir = $(APP_MAN_DIR) 245 246appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) 247 248EXTRA_DIST += $(appman_PRE) 249CLEANFILES += $(appman_DATA) 250 251SED = sed 252 253# Strings to replace in man pages 254XORGRELSTRING = @PACKAGE_STRING@ 255 XORGMANNAME = X Version 11 256 257MAN_SUBSTS = \ 258 -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ 259 -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ 260 -e 's|__xservername__|Xorg|g' \ 261 -e 's|__xconfigfile__|xorg.conf|g' \ 262 -e 's|__projectroot__|$(prefix)|g' \ 263 -e 's|__apploaddir__|$(appdefaultdir)|' \ 264 -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ 265 -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \ 266 -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ 267 -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ 268 -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' 269 270SUFFIXES += .$(APP_MAN_SUFFIX) .man 271 272.man.$(APP_MAN_SUFFIX): 273 sed $(MAN_SUBSTS) < $< > $@ 274 275EXTRA_DIST += ChangeLog 276MAINTAINERCLEANFILES = ChangeLog 277 278.PHONY: ChangeLog 279 280ChangeLog: 281 (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) 282 283dist-hook: ChangeLog 284