]> git.draconx.ca Git - dxcommon.git/blobdiff - scripts/fix-gnulib.pl
fix-gnulib: Drop silly libgnu warning options.
[dxcommon.git] / scripts / fix-gnulib.pl
index 3af852d20d0ec54f4c42e759a1904c3e4db066da..69a7d864f29e939385a3f712d6fa1515318468e1 100755 (executable)
@@ -186,6 +186,16 @@ EOF
        # useful for non-recursive builds.  Strip them out.
        drop if (/^(AM_CPPFLAGS|AM_CFLAGS)/);
 
+       # We don't care about upstream warning flags that just result in adding
+       # massive amounts of additional build rules for no reason.
+       if (/_CFLAGS/) {
+               s/ *\$\(GL_CFLAG_GNULIB_WARNINGS\)// if /_CFLAGS\s*=/;
+       }
+
+       # Drop superfluous CFLAGS assignments (which may be created by above
+       # transformation).
+       drop if /_CFLAGS\s*=\s*\$\(AM_CFLAGS\)\s*$/;
+
        # Library dependencies are added automatically to libgnu.la by
        # gnulib-tool.  Unfortunately, this means that everything linking
        # against libgnu.la is forced to pull in the same deps, even if they're