stephenrkell / libdwarfpp

A high-level API for accessing DWARF debugging information, in C++
http://www.cl.cam.ac.uk/~srk31/
Other
23 stars 12 forks source link

Usage of $(includedir) in Makefile.am points to prefix includedir #5

Closed Stefan-Schmidt closed 9 years ago

Stefan-Schmidt commented 9 years ago

I'm building the lib with --prefix=/usr/local/ which leads to problems with your extra rules in Makefile.am The $(includedir) points to /usr/local/inlcude instead of the correct /usr/include in this case. The libs installed by the package manager would still be in /usr and not /usr/local.

I hardcoded it for myself but that is really not a generic solution.

--- a/Makefile.am +++ b/Makefile.am @@ -19,14 +19,14 @@ INC_PP = include/dwarfpp BUILT_SOURCES = $(INC_PP)/dwarf-onlystd.h $(INC_PP)/dwarf-onlystd-v2.h $(INC_PP)/dwarf-ext-GNU.h $(INC_PP)/dwarf3-adt.h $(INC_PP)/dwarf3-factory.h CLEANFILES = $(BUILT_SOURCES)

-include/dwarfpp/dwarf-onlystd.h: $(includedir)/dwarf.h +include/dwarfpp/dwarf-onlystd.h: /usr/include/libdwarf/dwarf.h cat "$<" | egrep -v 'DW[A-Z]+(GNU|SUN|HP|APPLE|INTEL|ARM|upc|PGI|ALTIUM|MIPS|CPQ|VMS|GNAT)' | \ egrep -v '/ (SGI|GNU)( /|. )' | egrep -v 'LANG_Mips|LANG_Upc' | egrep -v '_use_GNAT' | egrep -v 'ATCF entries start at|DW_LANG_UPC instead.' > "$@"

include/dwarfpp/dwarf-onlystd-v2.h: include/dwarfpp/dwarf-onlystd.h cat "$<" | grep -v 'DWARF[^2]' > "$@"

-include/dwarfpp/dwarf-ext-GNU.h: $(includedir)/dwarf.h +include/dwarfpp/dwarf-ext-GNU.h: /usr/include/libdwarf/dwarf.h cat "$<" | egrep '(|/* |, )GNU' | egrep -vi conflict | egrep -vi '^[[:blank:]]/_' > "$@"

include/dwarfpp/dwarf3-adt.h: spec/gen-adt-cpp.py spec/dwarf3.py

stephenrkell commented 9 years ago

Thanks for this report. I've a feeling this is fixed in 6bf77e6... confirmation (or otherwise) welcome!

Stefan-Schmidt commented 9 years ago

I can confirm that this is fixed when given the correct libdwarf path with the new configure option