1706f2543Smrg# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM 2706f2543Smrg# to cpp, because that trick does not work on all ANSI C preprocessors. 3706f2543Smrg# Delete line numbers from the cpp output (-P is not portable, I guess). 4706f2543Smrg# Allow XCOMM to be preceded by whitespace and provide a means of generating 5706f2543Smrg# output lines with trailing backslashes. 6706f2543Smrg# Allow XHASH to always be substituted, even in cases where XCOMM isn't. 7706f2543Smrg 8706f2543SmrgCPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ 9706f2543Smrg -e '/^\#line *[0-9][0-9]* *.*$$/d' \ 10706f2543Smrg -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ 11706f2543Smrg -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ 12706f2543Smrg -e '/^[ ]*XHASH/s/XHASH/\#/' \ 13706f2543Smrg -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ 14706f2543Smrg -e '/\@\@$$/s/\@\@$$/\\/' 15706f2543Smrg 16706f2543SmrgSUFFIXES = .cpp 17706f2543Smrg 18706f2543Smrg.cpp: 19706f2543Smrg $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ 20