You should not need to build calibre for this. Set up the calibre development environment as described in:
https://manual.calibre-ebook.com/develop.html
If you want to add options to the PDF input plugin, you just need to modify the plugins/pdf_input.py file to add the option. It will show up in ebook-convert automatically. To add it to the gui you need to edit convert/pdf_input.ui with qt designer to add the gui widgets for the options.