14642e01fSmrg# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM 24642e01fSmrg# to cpp, because that trick does not work on all ANSI C preprocessors. 34642e01fSmrg# Delete line numbers from the cpp output (-P is not portable, I guess). 44642e01fSmrg# Allow XCOMM to be preceded by whitespace and provide a means of generating 54642e01fSmrg# output lines with trailing backslashes. 64642e01fSmrg# Allow XHASH to always be substituted, even in cases where XCOMM isn't. 74642e01fSmrg 84642e01fSmrgCPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ 94642e01fSmrg -e '/^\#line *[0-9][0-9]* *.*$$/d' \ 104642e01fSmrg -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ 114642e01fSmrg -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ 124642e01fSmrg -e '/^[ ]*XHASH/s/XHASH/\#/' \ 134642e01fSmrg -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ 144642e01fSmrg -e '/\@\@$$/s/\@\@$$/\\/' 154642e01fSmrg 169ace9065SmrgSUFFIXES = .cpp 174642e01fSmrg 184642e01fSmrg.cpp: 199ace9065Smrg $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ 20