Skip to content

Latest commit

Β 

History

History
28 lines (21 loc) Β· 1.04 KB

File metadata and controls

28 lines (21 loc) Β· 1.04 KB

Python MAKE μ‚¬μš©ν•˜λŠ” 방법

  • Although you cannot compile these modules using make, you can still use make for automation tasks like running tests, installing dependencies, cleaning the .pyc files etc.

  • https://earthly.dev/blog/python-makefile/

  • .phony

    • λ§Œμ•½ target κ³Ό λ™μΌν•œ 파일 이름이 μžˆλŠ” 경우, 항상 μ΅œμ‹ κ²ƒμœΌλ‘œ κ°„μ£Όν•΄μ„œ λ ˆμ‹œν”Ό μˆ˜ν–‰ν•˜μ§€ μ•ŠλŠ”λ‹€.!
    • 그럴 경우, targetλͺ…에 .phonyλ₯Ό λͺ…μ‹œν•΄μ€„ 경우 ν•΄κ²°λœλ‹€.!
    • μΆ”κ°€λ‘œ, 병렬 μˆ˜ν–‰λ„ κ°€λŠ₯해짐!
  • Makefile μž‘μ„± 법

target: pre-req1 pre-req2 pre-req3 ...
    recipes
    ...
  • target : λΉŒλ“œμ—μ„œ μƒμ„±λ˜μ–΄μ•Ό ν•˜λŠ” 파일.

  • req : λ‹¬μ„±λ˜μ–΄μ•Ό ν•  μ „μ œ 쑰건

  • recipres : μˆ˜ν–‰λ˜μ–΄μ•Ό ν•  λͺ…λ Ήμ–΄ λͺ©λ‘

  • μˆ˜ν–‰ 절차

    • makeκ°€ μˆ˜ν–‰λ  λ•Œ, μ „μ œ 쑰건듀을 μ‚΄νŽ΄λ΄„.
    • recipes κ°€μ§€κ³  있으면, λͺ¨λ‘ μˆ˜ν–‰λœ ν›„ νƒ€κ²Ÿ 생성 μˆ˜ν–‰.
    • 각 νƒ€κ²Ÿμ— λŒ€ν•΄, νƒ€κ²Ÿμ΄ μ‘΄μž¬ν•˜μ§€ μ•Šκ±°λ‚˜ μ „μ œ 쑰건듀이 νƒ€κ²Ÿλ³΄λ‹€ μƒˆλ‘œμš΄ κ²½μš°μ—λ§Œ 싀행됨.!