How to debug a Mk-Script?

Torsten Zühlsdorff mailinglists at toco-domains.de
Fri Oct 23 07:39:11 UTC 2015



On 21.10.2015 06:12, Bryan Drewery wrote:
> On 10/19/2015 1:50 AM, Torsten Zuehlsdorff wrote:
>> Hello,
>>
>> after defining a USES pgsql:9.3+ in an port-update i stumbled over this
>> error message:
>>
>> the port wants postgresql-client version 9.3 9.4 and you have version
>> 9.4 installed.
>>
>> This seems to be an error in Mk/Uses/pgsql.mk which i found to track
>> down (in order to gather some more experience).
>>
>> While i have already an idea what the case can be, i just want to add
>> some output into the script. How is this possible? Can someone guide me
>> please?
>>
>> Thanks,
>> Torsten
>
> If you're on 10+ you can use .info, otherwise .warning on older make.
>
> .info your ${msg} goes ${here}
>
> .if defined(whatever)
> .info whatever is defined as: ${whatever}
> .endif

This works much better than misusing IGNORE :D

Still wasn't able to fix the bug... but this is an good exercise.

Thanks!
Torsten


More information about the freebsd-ports mailing list