qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.28k stars 39.39k forks source link

[Q] How to add a generated file to the build? #1815

Closed hlship closed 4 years ago

hlship commented 7 years ago

In my fork (https://github.com/hlship/qmk_firmware/tree/cursivetastic/keyboards/ergodox_ez/keymaps/cursivetastic) I have a script that generates a gen-keymap.h file that is included from my largely-skeleton keymap.c file.

However, especially with the recent changes to the build system, I have been unable to figure out how to add a rule, somewhere, to generate the gen-keymap.h file. Is this kind of thing even supported? If not, can it be added?

My rules are very simple:

gen-keymap.h: src/cursivetastic/keymapping.cljc
    lumo src/cursivetastic/keymapping.cljc

keymap.c: gen-keymap.h

... but I don't see me submitting a PR back to qmk_firmware because cursivetastic is very, very, very, (very!) specific to my needs. But I continue to track qmk_firmware as my upstream, and want a process where I can just execute a quick make when I change my keymapping.cljc script.

drashna commented 6 years ago

I don't think there is a good answer for you.

You'd want to rebase (git rebase upstream master, or git pull --rebase). And then you'd need to change things.

And I don't think that your makefile will work at all. And you'd probably need to modify /tmk_core/build_avr.mk to re-add this

drashna commented 6 years ago

Were you able to resolve this?

hlship commented 6 years ago

Nope! Haven't had the spare cycles to figure out a better solution. I just have an ugly manual process.

drashna commented 6 years ago

Okay, totally understand that.

stale[bot] commented 4 years ago

This issue has been automatically marked as resolved because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.

stale[bot] commented 4 years ago

This issue has been automatically closed because it has not had activity in the last 30 days. If this issue is still valid, re-open the issue and let us know.