Skip to contentSkip to conversation

Put -I m4 in ACLOCAL_AMFLAGS so ./autogen.sh just works

PATCH In review Matt Turner 2 participants 3 messages Feb 8, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Put -I m4 in ACLOCAL_AMFLAGS so ./autogen.sh just works

---
 Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.am +1 -1
index 0dd615b..20bca79 100644
@@ -19,7 +19,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
 
 SUBDIRS = lib man tools scripts benchmarks demos
 
Signature · 1 line
1.7.8.6
#1 lore raw

PATCH 2/2 quick_dump: Makefile.am best practices and fix distcheck

A few changes
- Put CPPFLAGS in AM_CPPFLAGS instead of a per-target CFLAGS var;
- Use _LIBS/_CFLAGS from pkg-config instead of hard-coded values;
- List non-generated scripts in dist_bin_SCRIPTS;
- Add chipset.py to the run that implicitly generates it, which fixes distcheck.

---
 tools/quick_dump/Makefile.am |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
tools/quick_dump/Makefile.am +6 -4
index e89a115..42ab140 100644
@@ -1,17 +1,19 @@
+AM_CPPFLAGS = -I$(top_srcdir)/lib $(PYTHON_CPPFLAGS) $(DRM_CFLAGS)
+
 BUILT_SOURCES = chipset_wrap_python.c
 
-bin_SCRIPTS = quick_dump.py chipset.py reg_access.py
+dist_bin_SCRIPTS = quick_dump.py reg_access.py
+bin_SCRIPTS = chipset.py
 
 lib_LTLIBRARIES = I915ChipsetPython.la
-I915ChipsetPython_la_CFLAGS = -I$(top_srcdir)/lib $(PYTHON_CPPFLAGS) $(CFLAGS) -I/usr/include/libdrm/
-I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) -lpciaccess
+I915ChipsetPython_la_LDFLAGS = -module -avoid-version $(PYTHON_LDFLAGS) $(PCIACCESS_LIBS)
 I915ChipsetPython_la_SOURCES = chipset_wrap_python.c intel_chipset.c \
 			       $(top_srcdir)/lib/intel_drm.c  \
 			       $(top_srcdir)/lib/intel_pci.c  \
 			       $(top_srcdir)/lib/intel_reg_map.c  \
 			       $(top_srcdir)/lib/intel_mmio.c
 
-chipset_wrap_python.c: chipset.i
+chipset_wrap_python.c chipset.py: chipset.i
 	$(SWIG) $(AX_SWIG_PYTHON_OPT) -I/usr/include -I$(top_srcdir)/lib -o $@ $<
 
 all-local: I915ChipsetPython.la
Signature · 1 line
1.7.8.6
#2 lore raw
In reply to Matt Turner
Quoted 9 lines · Matt Turner
---
 Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.am +0 -0
index 0dd615b..20bca79 100644

Makefile.am line 25

Quoted 8 lines
Makefile.am +1 -1
@@ -19,7 +19,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
+ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
 
 SUBDIRS = lib man tools scripts benchmarks demos
 

I've pushed both patches. Thanks.

Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center