[Mesa-dev] [PATCH 03/12] util: automake: rework the format_srgb.c rule
Emil Velikov
emil.l.velikov at gmail.com
Fri Jul 17 10:29:25 PDT 2015
A hardful of changes/cleanups paving the way to bmake support:
- Don't bother with a $(srcdir) to the prereq list.
- No space after the AM_V_GEN variable.
- Using $< in a non-suffix rule is a GNU make idiom.
- Use $(@D) over $(dir $@). The latter makes bmake unhappy.
XXX: Many places from now on use/set the following two variables.
- Should we fold them somewhere - makefile/configure.ac ?
- Can we reuse them (or the whole rule with android, via
makefile.sources - needs scons fix, otherwise) ?
- Can/should we unconditionally call `mkdir -p .' and fold the two
variables ?
PYTHON_GEN and MKDIR_GEN
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
src/util/Makefile.am | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index 1e087b4..5aa5954 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -59,5 +59,7 @@ BUILT_SOURCES = $(MESA_UTIL_GENERATED_FILES)
CLEANFILES = $(BUILT_SOURCES)
EXTRA_DIST = format_srgb.py SConscript
-format_srgb.c: $(srcdir)/format_srgb.py
- $(AM_V_GEN) $(PYTHON2) $< > $@
+PYTHON_GEN = $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)
+
+format_srgb.c: format_srgb.py
+ $(PYTHON_GEN) $(srcdir)/format_srgb.py > $@
--
2.4.5
More information about the mesa-dev
mailing list