.x-sc_obsolete_symbols \
.x-sc_program_name \
.x-sc_prohibit_atoi_atof \
+ .x-sc_prohibit_stat_st_blocks \
.x-sc_prohibit_strcmp \
.x-sc_require_config_h \
.x-sc_space_tab .x-sc_sun_os_names \
exit 1; } || :; \
fi
+# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
+# This is a bit of a kludge, since it prevents use of the string
+# even in comments, but for now it does the job with no false positives.
+sc_prohibit_stat_st_blocks:
+ @grep -nE '[.>]st_blocks' $$($(VC_LIST_EXCEPT)) && \
+ { echo '$(ME): do not use st_blocks; use ST_NBLOCKS' \
+ 1>&2; exit 1; } || :
+
+# Make sure we don't define any S_IS* macros in src/*.c files.
+# They're already defined via gnulib's sys/stat.h replacement.
+sc_prohibit_S_IS_definition:
+ @grep -nE '^ *# *define *S_IS' $$($(VC_LIST_EXCEPT)) && \
+ { echo '$(ME): do not define S_IS* macros; include <sys/stat.h>' \
+ 1>&2; exit 1; } || :
+
NEWS_hash = \
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
$(srcdir)/NEWS | md5sum -)
pr = progs-readme
# Ensure that the list of programs in README matches the list
# of programs we can build.
-check: check-README check-misc check-duplicate-no-install
+check: check-README check-duplicate-no-install
.PHONY: check-README
check-README:
rm -rf $(pr) $(pm)
sed -n '/^[^ ][^ ]*:/p' $(top_srcdir)/AUTHORS > $(au_dotdot)
diff $(au_actual) $(au_dotdot) && rm -f $(au_actual) $(au_dotdot)
-# Make sure we don't define any S_IS* macros in src/*.c files.
-# Not a big deal, but they're already defined via system.h.
-#
-# Also make sure we don't use st_blocks. Use ST_NBLOCKS instead.
-# This is a bit of a kludge, since it prevents use of the string
-# even in comments, but for now it does the job with no false positives.
-.PHONY: check-misc
-check-misc:
- cd $(srcdir); grep '^# *define *S_IS' $(SOURCES) && exit 1 || :
- cd $(srcdir); grep st_blocks $(SOURCES) && exit 1 || :
- cd $(srcdir); grep '^# *define .*defined' $(SOURCES) && exit 1 || :
-
# Extract the list of authors from each file.
sed_filter = s/^ *//;s/N_ (//;s/^"//;s/")*$$//
# Sometimes the string is on the same line as the #define...