Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, that Makefile rule...

    smr: smr.c
        @${RM} -rf smr
        ${CP} smr.c smr
        ${CHMOD} +x smr


why the "wow"? Looks ok to me.


Copy a .c file to an executable is definitely not ok, normally you'd call the compiler here.

It only works because it is a very special c file.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: