Makefile :: Parser. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://search.cpan.org/~agent/OpenResty-0.3.14/lib/OpenResty/Spec/Overview.pod
Makefile :: Parser. ű×
Makefile :: Parser. ¼³¸í
makefiles for simple parser makefile :: parser´Â makefiles for makefiles.Synopsis »ç¿ë makefile :: parser; $ parser = makefile :: parser-> new; # »óÀÀÇÏ´Â -> ±¸¹® ( 'makefile'); $ Parser-> ±¸¹® ºÐ¼® ¶Ç´Â ´ÙÀÌ ¸ÞÀÌÅ© ÆÄÀÏ :: Æļ -> ¿À·ù; # ÁöÁ¤µÈ º¯¼ö 'cc'¿¡ ¸¶Áö¸· °ªÀ» ÁöÁ¤ÇÕ´Ï´Ù. '$ Parser-> var ('cc ') Àμâ; # makefile¿¡ Á¤ÀÇ µÈ ¸ðµç º¯¼ö À̸§ °¡Á® ¿À±â : @Vars = $ parser-> vars; Àμâ Á¶ÀÎ ( '', @Vars Á¤·Ä); @roots = $ Æļ -> »Ñ¸®; # ¸ðµç "·çÆ® Ÿ°Ù"Àμâ $ ·çÆ® -> À̸§; @tars = $ Parser-> ´ë»ó; # ¸ðµç ´ë»óÀ» ¾òÀ¸½Ê½Ã¿À $ tar = join ( "n", $ tars -> ¸í·É); # makefile¿¡ Á¤ÀÇ µÈ ù ¹ø° ´ë»ó : $ tar = $ parser-> ´ë»ó; $ tar = $ parser-> ´ë»ó ( '¼³Ä¡'); # ´ë»óÀÇ À̸§À» ¾òÀ¸½Ê½Ã¿À, '¼³Ä¡'¿©±â¿¡ : $ tar-> À̸§ Àμâ; # ´ë»ó '¼³Ä¡'¿¡ ´ëÇÑ Á¾¼Ó¼ºÀ» ¾òÀ¸½Ê½Ã¿À. @depends = $ tar->´Â ÀÇÁ¸ÇÕ´Ï´Ù. # ÇöÀç ´ë»óÀ» ºôµåÇÏ´Â µ¥ »ç¿ëµÇ´Â ½© ¸í·É¿¡ ¾×¼¼½ºÇϽʽÿÀ. @cmds = $ tar-> ¸í·É; # µ¿ÀÏÇÑ Æļ °´Ã¼¸¦ »ç¿ëÇÏ¿© ´Ù¸¥ ÆÄÀÏÀ» ±¸¹® ºÐ¼®ÇÕ´Ï´Ù. $ parser-> ±¸¹® ( 'makefile.old') ¶Ç´Â die makefile :: parser-> ¿À·ù; # º¯¼ö Exe_File $ tar = $ parser-> ´ë»ó ($ parser-> var ( 'exe_file) º¯¼ö·Î ÁöÁ¤µÈ ´ë»óÀ» ¾ò½À´Ï´Ù. ÀÌ°ÍÀº makefilesÀÇ ÆļÀÔ´Ï´Ù. ÀÌ ¸Å¿ì Ãʱ⠴ܰ迡¼ Æļ´Â Á¦ÇÑµÈ ±â´É ¼¼Æ® ¸¸ Áö¿øÇϹǷΠGNU¿Í °°Àº ƯÁ¤ µµ±¸°¡ Á¦°øÇÏ´Â ÀϺΠ°í±Þ ±â´ÉÀ» ÀνÄÇÏÁö ¸øÇÒ ¼öµµ ÀÖ½À´Ï´Ù. Ãʱ⠸ñÀûÀº MakeFile :: GraphViz¶ó´Â ´Ù¸¥ ¸ðµâ¿¡ ´ëÇÑ ±âº» Áö¿øÀ» Á¦°øÇÏ´Â °ÍÀÔ´Ï´Ù. ÀÌ´Â Amazing GraphViz ¶óÀ̺귯¸®¸¦ »ç¿ëÇÏ¿© MakefileÀÌ ÁöÁ¤ÇÑ °Ç¹° ÇÁ·Î¼¼½º¸¦ ·»´õ¸µÇÏ´Â °ÍÀ» ¸ñÇ¥·ÎÇÕ´Ï´Ù. Make ModuleÀº ÀÌ·¯ÇÑ ¸ñÀûÀ» À§ÇØ ¸¸Á·½º·´Áö ¾Ê½À´Ï´Ù. ±×·¡¼ ³ª´Â ³» ÀÚ½ÅÀÇ Çϳª¸¦ ±¸ÃàÇϱâ·Î °áÁ¤Çß½À´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.
Makefile :: Parser. °ü·Ã ¼ÒÇÁÆ®¿þ¾î