0

The code below (in Makefile) works fine for linux, but I want to make universal makefile for linux and windows.

migrations:
    @read -p "Enter migration message: " message; \
    alembic revision --autogenerate --message "$$message"

How can I do it?

svlasov
  • 9,923
  • 2
  • 38
  • 39
  • What is the problem with running it in Windows? – svlasov Jul 05 '23 at 14:48
  • It's always a very bad idea, even on POSIX systems like GNU/Linux, to have a Makefile recipe that reads from standard input. Users should provide data via command line variable settings, like `make MESSAGE='this is my message'` – MadScientist Jul 05 '23 at 14:56
  • Line endings are different for text files on Windows. – stark Jul 05 '23 at 15:33

0 Answers0