Makefile.am revision ce6676db
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 22configdir = $(sysconfdir)/X11/fs 23 24bin_PROGRAMS = xfs 25 26FONT_FLAGS = -DFONT_PCF -DFONT_FS -DFONT_SPEEDO 27 28AM_CPPFLAGS = $(XFS_CFLAGS) -I$(top_srcdir)/include -DXFSPIDDIR=\"/var/run\" \ 29 $(FONT_FLAGS) -D_BSD_SOURCE -DFONT_t -DTRANS_SERVER -DTRANS_REOPEN 30 31AM_CFLAGS = $(CWARNFLAGS) 32 33LDADD = $(XFS_LIBS) 34 35xfs_SOURCES = \ 36 difs/atom.c \ 37 difs/cache.c \ 38 difs/charinfo.c \ 39 difs/difsutils.c \ 40 difs/dispatch.c \ 41 difs/events.c \ 42 difs/extensions.c \ 43 difs/fontinfo.c \ 44 difs/fonts.c \ 45 difs/globals.c \ 46 difs/initfonts.c \ 47 difs/main.c \ 48 difs/resource.c \ 49 difs/swaprep.c \ 50 difs/swapreq.c \ 51 difs/tables.c \ 52 os/access.c \ 53 os/config.c \ 54 os/config.h \ 55 os/configstr.h \ 56 os/connection.c \ 57 os/daemon.c \ 58 os/error.c \ 59 os/io.c \ 60 os/osdep.h \ 61 os/osglue.c \ 62 os/osinit.c \ 63 os/utils.c \ 64 os/waitfor.c \ 65 os/xfstrans.c \ 66 include/access.h \ 67 include/assert.h \ 68 include/auth.h \ 69 include/authstr.h \ 70 include/cache.h \ 71 include/cachestr.h \ 72 include/client.h \ 73 include/clientstr.h \ 74 include/closestr.h \ 75 include/closure.h \ 76 include/difsfn.h \ 77 include/difsfnst.h \ 78 include/difs.h \ 79 include/difsutils.h \ 80 include/dispatch.h \ 81 include/extentst.h \ 82 include/fsevents.h \ 83 include/fsresource.h \ 84 include/globals.h \ 85 include/misc.h \ 86 include/os.h \ 87 include/osstruct.h \ 88 include/servermd.h \ 89 include/site.h \ 90 include/swaprep.h \ 91 include/swapreq.h 92 93appman_PRE = \ 94 xfs.man 95 96FSERRORS = /var/log/xfs.log 97 98FONTDIR = $(libdir)/X11/fonts 99 100# Strings to replace in config.cpp 101CPP_FILES_FLAGS = $(MANDEFS) \ 102 -DDEFAULTFONTPATH="$(FONTPATH)" -DFSERRORS="$(FSERRORS)" 103 104config_DATA = config 105 106EXTRA_DIST = xfs.def config.cpp 107CLEANFILES = config 108 109appmandir = $(APP_MAN_DIR) 110 111appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) 112 113EXTRA_DIST += $(appman_PRE) 114CLEANFILES += $(appman_DATA) 115 116SED = sed 117 118# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM 119# to cpp, because that trick does not work on all ANSI C preprocessors. 120# Delete line numbers from the cpp output (-P is not portable, I guess). 121# Allow XCOMM to be preceded by whitespace and provide a means of generating 122# output lines with trailing backslashes. 123# Allow XHASH to always be substituted, even in cases where XCOMM isn't. 124 125CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ 126 -e '/^\#line *[0-9][0-9]* *.*$$/d' \ 127 -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ 128 -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ 129 -e '/^[ ]*XHASH/s/XHASH/\#/' \ 130 -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ 131 -e '/\@\@$$/s/\@\@$$/\\/' 132 133# Strings to replace in man pages 134XORGRELSTRING = @PACKAGE_STRING@ 135 XORGMANNAME = X Version 11 136 137MANDEFS = \ 138 -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ 139 -D__appmansuffix__=$(APP_MAN_SUFFIX) \ 140 -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ 141 -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ 142 -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ 143 -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ 144 -D__configfiledesc__="$(CONFIG_FILE_DESC)" \ 145 -D__configfilepath__="$(CONFIG_FILE_PATH)" 146 147SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp 148 149.cpp: 150 $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ 151 152.man.$(APP_MAN_SUFFIX): 153 $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ 154 155EXTRA_DIST += ChangeLog 156MAINTAINERCLEANFILES = ChangeLog 157 158.PHONY: ChangeLog 159 160ChangeLog: 161 $(CHANGELOG_CMD) 162 163dist-hook: ChangeLog 164 165if LINT 166ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 167 $(AM_CPPFLAGS) $(CPPFLAGS) 168 169lint: 170 $(LINT) $(ALL_LINT_FLAGS) $(xfs_SOURCES) 171endif LINT 172 173# Developer documentation - not installed on system 174EXTRA_DIST += doc/xfs-design.xml doc/xfs-design.css doc/xfs-design.xsl 175 176if MAKE_DEVEL_DOCS 177if HAVE_XMLTO 178noinst_DATA = doc/xfs-design/index.html doc/xfs-design.pdf doc/xfs-design.txt 179CLEANFILES += $(noinst_DATA) 180 181doc/xfs-design/index.html: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl doc/xfs-design/xfs-design.css 182 $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc/xfs-design xhtml $(srcdir)/doc/xfs-design.xml 183 184doc/xfs-design/xfs-design.css: $(srcdir)/doc/xfs-design.css 185 -rm -f doc/xfs-design/xfs-design.css 186 $(MKDIR_P) doc/xfs-design 187 cp -pf $(srcdir)/doc/xfs-design.css doc/xfs-design/xfs-design.css 188 189clean-local: 190 -rm -rf doc/xfs-design 191 192doc/xfs-design.pdf: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl 193 $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml 194 195doc/xfs-design.txt: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl 196 $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc txt $(srcdir)/doc/xfs-design.xml 197 198endif HAVE_XMLTO 199endif MAKE_DEVEL_DOCS 200