Paul Eggert wrote: > If you can't assume 'sed', you can compile and run > a simple program that does the "@" replacement.
Yes, given that the uses of 'sed' in gnulib are nearly all of the form sed -e 's/@VAR1@/VALUE1/g' ... -e 's/@VARn@/VALUEn/g' FILE you could write a program 'atsubst' such that atsubst VAR1 VALUE1 ... VARn VALUEn FILE is equivalent to sed -e 's/@VAR1@/VALUE1/g' ... -e 's/@VARn@/VALUEn/g' FILE This 'atsubst' program is simple enough that it fits in a single file (like 'envsubst' in GNU gettext); it can be a prerequisite single command for anyone who builds 'make'. > Alternatively, we could change Gnulib to use "_GLat" instead of "@" > uniformly, so that you don't need to do the "@" replacement in GNU Make; I don't think this would fully work. Regarding @INCLUDE_NEXT@ for example: You can't have a C macro that expands to either #include or #include_next. So, Paul would probably have to generate foo.halfsubsted.h from foo.in.h where @GUARD_PREFIX@, @INCLUDE_NEXT@, @PRAGMA_SYSTEM_HEADER@, @PRAGMA_COLUMNS@ and @NEXT_FOO_H@ have been already substituted, and use C preprocessor expansion (i.e. HAVE_FOO instead of @HAVE_FOO@) for the other symbols. I would see this machinery as being in GNU make only (no modifications in gnulib), unless/until the GNU bash, coreutils, grep, gawk, sed projects want to use it as well. Bruno