Add mouse and keyboard configuration file
[profile/ivi/xorg-x11-server.git] / cpprules.in
1 #                                                       -*- Makefile -*-
2 # Rules for generating files using the C pre-processor
3 # (Replaces CppFileTarget from Imake)
4
5 SUFFIXES = .pre .man .man.pre
6
7 # Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
8 # to cpp, because that trick does not work on all ANSI C preprocessors.
9 # Delete line numbers from the cpp output (-P is not portable, I guess).
10 # Allow XCOMM to be preceded by whitespace and provide a means of generating
11 # output lines with trailing backslashes.
12 # Allow XHASH to always be substituted, even in cases where XCOMM isn't.
13
14 CPP_SED_MAGIC = $(SED) -e '/^\#  *[0-9][0-9]*  *.*$$/d' \
15                        -e '/^\#line  *[0-9][0-9]*  *.*$$/d' \
16                        -e '/^[         ]*XCOMM$$/s/XCOMM/\#/' \
17                        -e '/^[         ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \
18                        -e '/^[         ]*XHASH/s/XHASH/\#/' \
19                        -e '/\@\@$$/s/\@\@$$/\\/'
20
21 # Strings to replace in man pages
22 XORGRELSTRING = @PACKAGE_STRING@
23   XORGMANNAME = X Version 11
24   XSERVERNAME = Xorg
25
26 MANDEFS = \
27         -D__vendorversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
28         -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \
29         -D__appmansuffix__=$(APP_MAN_SUFFIX) \
30         -D__filemansuffix__=$(FILE_MAN_SUFFIX) \
31         -D__libmansuffix__=$(LIB_MAN_SUFFIX) \
32         -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \
33         -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \
34         -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \
35         -D__mandir__=$(mandir) \
36         -D__projectroot__=$(prefix) \
37         -D__sysconfdir__=$(sysconfdir) \
38         -D__datadir__=$(datadir) \
39         -D__xconfigfile__=$(__XCONFIGFILE__) \
40         -D__xconfigdir__=$(__XCONFIGDIR__) \
41         -D__xkbdir__=$(XKB_BASE_DIRECTORY) \
42         -D__modulepath__="$(DEFAULT_MODULE_PATH)" \
43         -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) 
44
45 .pre:
46         $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@
47
48 .man.pre.man:
49         $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@