Alvaro Herrera <alvhe...@commandprompt.com> writes: > Maybe what you should be doing here is that modules should provide > another definition, say EXTENSION, and they have to explicitely define > it in their Makefile (maybe require EXTENSION_VERSION too or something > like that). I think the idea that modules should continue to work as > extensions without any modification is doomed.
In fact there's ifndef CONTROL that protects the black magic failing part, so that we could edit any contrib's Makefile to give the information we're trying to guess. I just had another try at it that seems to work much better, based on DATA and DATA_built: # create extension support ifndef CONTROL ifdef DATA_built EXTENSION = $(basename $(notdir $(firstword $(DATA_built)))) else ifdef DATA EXTENSION = $(basename $(notdir $(firstword $(DATA)))) endif ifdef EXTENSION CONTROL = $(EXTENSION).control endif endif Also, I've switched to using echo twice as you recommended, that's much better too. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers