[build-path-prefix-map-spec] 02/02: Specify C standard and add a top-level clean target
Ximin Luo
infinity0 at debian.org
Tue Mar 14 21:23:16 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository build-path-prefix-map-spec.
commit 63af87446903a00ce6ca953db409d4e16b45cafe
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Mar 14 22:21:36 2017 +0100
Specify C standard and add a top-level clean target
---
Makefile | 8 ++++++--
consume/Makefile | 2 +-
consume/prefix_map.h | 5 ++++-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index a6d5a02..e7b092e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
SPEC = build-path-prefix-map-spec
-all: $(SPEC).html check-produce check-consume
+all: check-produce check-consume $(SPEC).html
%.html: %.xml %.xsl fixup-footnotes.xsl
xmlto -x "$*.xsl" html-nochunks "$<"
@@ -25,10 +25,14 @@ $(SPEC)-testcases.rst: consume/testcases-pecsplit.rst
check-consume:
cd consume && $(MAKE) check
+.PHONY: clean-consume
+clean-consume:
+ cd consume && $(MAKE) clean
+
.PHONY: check-produce
check-produce:
cd produce && ./test-all.sh
.PHONY: clean
-clean:
+clean: clean-consume
rm -f *.html $(SPEC).xml $(SPEC)-testcases.rst $(SPEC).rst
diff --git a/consume/Makefile b/consume/Makefile
index 00e0926..2215686 100644
--- a/consume/Makefile
+++ b/consume/Makefile
@@ -30,7 +30,7 @@ $(foreach format,$(ALL_FORMATS),$(eval $(call find_testcases,$(format).1,env)))
all: $(ALL_SOURCE:%=%.out)
%.c.out: %.c prefix_map.h
- $(CC) -Wall -o "$@" "$<"
+ $(CC) -std=c11 -Werror -o "$@" "$<"
%.rs.out: %.rs
$(RUSTC) -W warnings -o "$@" "$<"
diff --git a/consume/prefix_map.h b/consume/prefix_map.h
index cf1b577..cf2ac23 100644
--- a/consume/prefix_map.h
+++ b/consume/prefix_map.h
@@ -1,4 +1,7 @@
-/* This file also contains C code, in a real implementation it would be split. */
+/* This file also contains implementation code, for our convenience. In a real
+ * program it would be split into a separate .c file, possibly several. */
+
+#define _POSIX_C_SOURCE 200809L
/* Some memory management primitives, basically copied from GCC. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/build-path-prefix-map-spec.git
More information about the Reproducible-commits
mailing list