Skip to content

Instantly share code, notes, and snippets.

@gvanrossum
Last active September 21, 2021 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gvanrossum/b8ca09175a0d1399a8999f13c7bfa616 to your computer and use it in GitHub Desktop.
Save gvanrossum/b8ca09175a0d1399a8999f13c7bfa616 to your computer and use it in GitHub Desktop.
def generate(source):
print("# What comes before")
print(f"{source.removesuffix(".py")}.c: $(srcdir)/{source}")
print("\t$(COMMAND)")
def generate_too(source):
print("# What comes before")
print(f"{source.removesuffix("some/bad-\"-stuff%!")}.c: $(srcdir)/{source}")
print("\t$(COMMAND)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment