run/lib/pkgconfig/libucw.pc: $(o)/ucw/libucw.pc
# The version of autoconf.h that is a part of the public API needs to have
-# the internal symbols filtered out.
-$(o)/ucw/autoconf.h: $(o)/autoconf.h
- $(M)"FILTER $< -> $@"
- $(Q)sed -f $(s)/ucw/filter-autoconf.sed <$< >$@
-
-# Also, public config.h needs to refer to <ucw/autoconf.h> instead of "autoconf.h"
+# the internal symbols filtered out, so we generate ucw/autoconf.h in the
+# configure script and let the public config.h refer to <ucw/autoconf.h>
+# instead of plain "autoconf.h".
$(o)/ucw/config.h: $(s)/ucw/config.h
$(M)"FILTER $< -> $@"
$(Q)sed -e 's/^#include "autoconf\.h"/#include <ucw\/autoconf.h>/' <$< >$@
+++ /dev/null
-# A sed script to weed out private symbols from <ucw/autoconf.h>
-
-/^\//n
-
-# Excluded symbols (danger of collision)
-/^#define CONFIG_DEBUG$/d
-
-# Included symbols
-/^#define CONFIG_/n
-/^#define CPU_/n
-
-d
Set("CONFIG_UCW_RADIX_SORTER_BITS" => 12);
}
+PostConfig {
+ AtWrite {
+ UCW::Configure::C::ConfigHeader("ucw/autoconf.h", [
+ # Excluded symbols (danger of collision)
+ '^CONFIG_DEBUG$' => 0,
+
+ # Included symbols
+ '^CONFIG_' => 1,
+ '^CPU_' => 1,
+ '^SHERLOCK_VERSION_' => 1,
+
+ ]);
+ } if Get("CONFIG_INSTALL_API");
+};
+
# We succeeded
1;