Ticket #100 (closed defect: fixed)
service-type-database does not build when srcdir != builddir
| Reported by: | tedp | Owned by: | lennart |
|---|---|---|---|
| Milestone: | Avahi 0.6.17 | Component: | build-system |
| Keywords: | Cc: |
Description
The service-types.db file does not build when Avahi is being built outside the srcdir. The cause is this fragment from Makefile.am:
service-types.db: service-types build-db
$(PYTHON) build-db $(srcdir)/$< $@
What happens is that the service-types dependency is resolved to the source directory because of the VPATH in the Makefile, then the build rule prepends the same path again, so you end up with something like:
/usr/bin/python build-db /build/avahi/service-type-database//build/avahi/service-type-database/service-types service-types.db
Traceback (most recent call last):
File "build-db", line 36, in ?
for ln in file(infn, "r"):
IOError: [Errno 2] No such file or directory: '/build/avahi/service-type-database//build/avahi/service-type-database/service-types'
There is another problem that even if this command fails, the service-types.db is created (but effectively empty), so next time make runs, it sees that the file exists and continues to build, even though the service-types.db file is not right.
Here's a suggested fix for Makefile.am:
service-types.db: service-types build-db
$(PYTHON) build-db $< $@.coming
mv $@.coming $@
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

