2. Makefile

We attempt to fix the brain dead install command. If it hits a an empty file set it gives an error: we fix it. If it hits a subdirectory it gives an error. We have no idea if it continues copying.
Start data section to Makefile[1 /1 ]
     1: CONFIG_ARGS=
     2: PREFIX=/usr/lib/felix/felix-1.1.3_rc4
     3: INSTALL_DIR=${PREFIX}/lib/felix/felix-1.1.3_rc4
     4: EXEC_DIR=${PREFIX}/bin
     5: MAN_DIR=${PREFIX}/man
     6: DOC_DIR=${INSTALL_DIR}
     7: BUILTIN_ISCR=python -O interscript/bin/iscr.py --nocache
     8: 
     9: all: lpsrc config script
    10: 	./mk extract 
    11: 	./mk --phase=build
    12: 	./mk --phase=host
    13: 	./mk --phase=target
    14: 	./mk test 
    15: 
    16: profile: dummy
    17: 	./mk --pkg=flx_compiler profile
    18: 
    19: bytecode: dummy
    20: 	./mk --pkg=flx_compiler bytecode
    21: 
    22: bytecode.profile: dummy
    23: 	./mk --pkg=flx_compiler bytecode profile
    24: 
    25: bytecode.debug: dummy
    26: 	./mk --pkg=flx_compiler bytecode debug
    27: 
    28: extract: dummy
    29: 	./mk extract
    30: 
    31: extract.force: dummy
    32: 	./mk extract force
    33: 
    34: tut: dummy
    35: 	./mk tutorial
    36: 
    37: grammar: dummy
    38: 	env PYTHONPATH=. python script/get_grammar src/flx_parse.mly >misc/flx_parse.grammar
    39: 	env PYTHONPATH=. python script/get_grammar src/cil/flx_cil_cparser.mly >misc/flx_cil_cparser.grammar
    40: #@tangle('\tenv PYTHONPATH=. python script/elk_flx_grgen misc/flx_parse.grammar >misc/elk_flx_gr.gr')
    41: 	env PYTHONPATH=. python script/flx_flx_grgen misc/flx_parse.grammar >lib/flx_grammar.flx
    42: #@tangle('\tenv PYTHONPATH=. python script/elk_flx_lexgen misc/flx_parse.grammar >misc/elk_flx_lex.cc')
    43: 	env PYTHONPATH=. python script/flx_tokgen misc/flx_parse.grammar >lib/flx_token.flx
    44: 
    45: compiler: dummy
    46: 	./mk --pkg=flx_compiler
    47: 
    48: flx_tools:
    49: 	./mk tools
    50: 
    51: tools: flx_tools grammar
    52: #tools: flx_tools grammar tools/lua_parser
    53: 
    54: #tools: grammar bin/flx_doc tools/lua_parser
    55: 
    56: tools/lua_parser: tools/lua_parser.flx
    57: 	bin/flx --test --static -c tools/lua_parser
    58: 
    59: bin/flx_doc: tools/flx_doc.flx
    60: 	bin/flx --test --static -c tools/flx_doc && mv tools/flx_doc bin/flx_doc
    61: 
    62: doc: grammar tools man impldoc rtldoc tutdoc
    63: 
    64: #doc: grammar tools libdoc man impldoc tutdoc tutstyle
    65: 
    66: impldoc: dummy
    67: 	./mk doc impldoc
    68: 
    69: rtldoc: dummy
    70: 	./mk rtldoc
    71: 
    72: tutdoc: dummy
    73: 	./mk doc tutdoc
    74: 	#cp doc/*.css tut/doc >/dev/null 2>&1
    75: 
    76: doc.quiet: grammar tools libdoc
    77: 	./mk quiet doc man impldoc
    78: 	cp doc/*.css tut/doc >/dev/null 2>&1
    79: 
    80: libdoc: grammar tools
    81: 	bin/flx_doc --outdir=libdoc \
    82: 	lib/std.flx lib/stl.flx lib/flx_lex.flx \
    83: 	lib/flx_token.flx lib/flx_grammar.flx lib/lua.flx lib/lua_parse.flx
    84: 	cp misc/flxdoc_style.css libdoc
    85: 
    86: man: dummy
    87: 	./mk man
    88: 
    89: test: dummy
    90: 	./mk test 
    91: 
    92: test.flx_ptf_static_pointer: dummy
    93: 	./mk test -DFLX_PTF_STATIC_POINTER 
    94: 
    95: test.inline: dummy
    96: 	./mk inline test 
    97: 
    98: test.inline.static: dummy
    99: 	./mk inline test static 
   100: 
   101: test.debug: dummy
   102: 	./mk debug test 
   103: 
   104: test.lua_parser: dummy
   105: 	for i in misc/lua/*.lua; do tools/lua_parser $$i; done;
   106: 
   107: tests: dummy
   108: 	./mk test check_output
   109: 	make tests.bagley
   110: 	make test.lua_parser
   111: 
   112: tests.sdl: dummy
   113: 	./mk sdl
   114: 	./mk static sdl
   115: 
   116: tests.verify: dummy
   117: 	./mk test check_output
   118: 
   119: tests.static: dummy
   120: 	./mk test static log_output
   121: 
   122: tests.inline: dummy
   123: 	./mk inline test log_output
   124: 
   125: tests.performance: dummy
   126: 	./mk performance
   127: 
   128: performance: tests.performance
   129: 
   130: tests.regression: dummy
   131: 	./mk regression
   132: 
   133: tests.bagley: dummy
   134: 	sh bagley/compile.sh
   135: 	sh bagley/run.sh
   136: 	sh bagley/check.sh
   137: 
   138: speed: dummy
   139: 	./mk speed
   140: 
   141: pfcount.all:
   142: 	./mk pfcount_all
   143: 
   144: pfcount:
   145: 	./mk pfcount
   146: 
   147: rtl.debug: dummy
   148: 	./mk rtl debug
   149: 
   150: rtl: dummy
   151: 	./mk rtl
   152: 
   153: rtl.optimise: dummy
   154: 	./mk rtl optimise_c
   155: 
   156: elkhound: dummy
   157: 	./mk elkhound
   158: 
   159: expect.bagley: clean
   160: 	./mk bagley
   161: 	sh bagley/compile.sh
   162: 	sh bagley/run.sh
   163: 	env PYTHONPATH=. python script/mk_expect bagley/felix > lpsrc/flx_bagley_expect.ipk
   164: 
   165: expect: clean
   166: 	./mk bagley
   167: 	sh bagley/compile.sh
   168: 	sh bagley/run.sh
   169: 	./mk test log_output
   170: 	env PYTHONPATH=. python script/mk_expect tut/examples > lpsrc/flx_tut_expect.ipk
   171: 	env PYTHONPATH=. python script/mk_expect test > lpsrc/flx_test_expect.ipk
   172: 	env PYTHONPATH=. python script/mk_expect bagley/felix > lpsrc/flx_bagley_expect.ipk
   173: 
   174: drivers: dummy
   175: 	./mk drivers
   176: 
   177: drivers.debug: dummy
   178: 
   179: help: dummy
   180: 	#type "make virgin" to wipe out the whole development system
   181: 	#other than the orginal sources, this makefile, and any user config data
   182: 	#
   183: 	#type "make boot" to extract the dervied sources
   184: 	#from the original sources, including the tutorial
   185: 	#
   186: 	#type "make" to build the felix compiler and runtime
   187: 	#REQUIRES OCAML 3.08.1 or better
   188: 	#REQUIRES g++ 3.xx or better
   189: 	#
   190: 	#type "make test" to build and execute all the tests
   191: 	#including all the tutorial examples
   192: 	#REQUIRES Felix
   193: 	#
   194: 	#type "make doc" to typeset the original sources
   195: 	#
   196: 	#Obtain the required privileges to install into the chosen directories
   197: 	#or ask someone who has the to do it for you
   198: 	#type "make install" to install Felix
   199: 
   200: script:
   201: 	./boot
   202: 
   203: clean-src:
   204: 	rm -rf lpsrc
   205: 	rm -rf interscript
   206: 	rm -rf raw
   207: 	rm -rf gpl
   208: 	rm -rf lgpl
   209: 	rm -rf sandbox
   210: 	rm -rf boot.sh
   211: 	rm -rf boot.bat
   212: 
   213: checkout:
   214: 	svn co https://svn.sourceforge.net:/svnroot/felix/felix/trunk .
   215: 
   216: update:
   217: 	svn update
   218: 
   219: 
   220: 
   221: debian/rules: lpsrc/flx_debian.pak lpsrc/flx_maker.ipk
   222: 	rm -rf debian
   223: 	${BUILTIN_ISCR} lpsrc/flx_debian.pak
   224: 	chmod u+x debian/rules
   225: 
   226: debian-package: debian/rules
   227: 	(cd .. && make -f flx/Makefile.debian_package_creator package)
   228: 
   229: www: dummy
   230: 	${BUILTIN_ISCR} lpsrc/flx_sourceforge.pak
   231: 
   232: clean: dummy
   233: 	rm -rf lpsrc/*.cache
   234: 	python script/maker clean
   235: 
   236: distclean:
   237: 	rm -rf pkg tut rtl test www src misc man bin doc lib impldoc htmlman tmp tmp.tmp
   238: 	rm -rf elk tmp faio demux tmp.out demos
   239: 	rm -rf flxcc_out c89 c99 cxx gnu89 gnu99 gnucxx cxx_sys
   240: 	rm -rf bagley
   241: 	rm -rf doc_out libdoc tools doxydoc
   242: 	rm -rf meta licences
   243: 	rm -rf lpsrc/*.cache
   244: 	rm -rf interscript/*.pyo
   245: 	rm -rf interscript/*/*.pyo
   246: 	rm -rf interscript/*/*/*.pyo
   247: 	rm -rf interscript/*.pyc
   248: 	rm -rf interscript/*/*.pyc
   249: 	rm -rf interscript/*/*/*.pyc
   250: 	rm -rf speed
   251: 	rm -rf cpkgs
   252: 	rm -rf spkgs
   253: 	rm -rf pthread
   254: 	rm -rf flxbuild
   255: 	rm -rf mkplugins
   256: 	rm -rf olddebian
   257: 	rm -rf script
   258: 	rm -rf manifests
   259: 	rm -rf pkg-stamps
   260: 
   261: virgin: distclean
   262: 	cp Makefile Makefile.old
   263: 	rm -rf debian/
   264: 	rm -f README LICENCE VERSION CONTENTS INSTALL AUTHORS NEWS COPYING ChangeLog
   265: 
   266: 
   267: backup: dummy
   268: 	(DATE=`date +"%Y-%m-%d-%H%M"`;\
   269: 	mkdir -p "lpbackup/$${DATE}";\
   270: 	find lpsrc -name "*.ipk" -exec cp "{}" "lpbackup/$${DATE}" ";";\
   271: 	find lpsrc -name "*.pak" -exec cp "{}" "lpbackup/$${DATE}" ";";\
   272: 	find homepage -name "*.html" -exec cp "{}" "lpbackup/$${DATE}" ";"\
   273: 	)
   274: 
   275: 
   276: config: dummy
   277: 	${BUILTIN_ISCR} lpsrc/flx_config.pak
   278: 	env PYTHONPATH=. python -O script/make_config.py --quiet --prefix=${PREFIX} ${CONFIG_ARGS}
   279: 
   280: config/config.py: config
   281: 
   282: boot: config/config.py
   283: 	${BUILTIN_ISCR} lpsrc/flx_maker.pak
   284: 
   285: default_wrappers:
   286: 	for i in tmp/*.default; do cp $$i config/`basename $$i .default`; done
   287: 
   288: wrappers.clean:
   289: 	rm -rf flxcc_out c89 c99 cxx gnu89 gnu99 gnucxx cxx_sys
   290: 
   291: config/cxx.flxcc: default_wrappers
   292: 
   293: wrappers:
   294: 	bin/flxcc config/c89.flxcc
   295: 	bin/flxcc config/c99.flxcc
   296: 	bin/flxcc config/gnu89.flxcc
   297: 	bin/flxcc config/gnu99.flxcc
   298: 	bin/flxcc config/cxx.flxcc
   299: 	bin/flxcc config/cxx_sys.flxcc
   300: 	bin/flxcc config/gnucxx.flxcc
   301: 	bin/flxcc config/usr_include.flxcc
   302: 
   303: install: dummy
   304: 	install -d ${MAN_DIR}
   305: 	install -d ${INSTALL_DIR}/bin
   306: 	install -d ${INSTALL_DIR}/lib
   307: 	install -d ${INSTALL_DIR}/rtl
   308: 	install -d ${INSTALL_DIR}/config
   309: 	install -d ${DOC_DIR}/doc
   310: 	install -d ${EXEC_DIR}
   311: 	for file in `ls config/*.py` `ls config/*.fpc` `ls config/*.flxcc`; do if [ -f $$file ]; then install $$file ${INSTALL_DIR}/config; fi; done
   312: 	install bin/flx ${EXEC_DIR}
   313: 	for file in `ls bin/*`;      do if [ -f $$file ]; then install $$file ${INSTALL_DIR}/bin; fi; done
   314: 	for file in `ls rtl/*`;      do if [ -f $$file ]; then install $$file ${INSTALL_DIR}/rtl; fi; done
   315: 	for file in `ls lib/*`;      do if [ -f $$file ]; then install $$file ${INSTALL_DIR}/lib; fi; done
   316: 	for file in `ls doc/*`;      do if [ -f $$file ]; then install $$file ${DOC_DIR}/doc; fi; done
   317: 	for file in `ls man/man1/*`; do if [ -f $$file ]; then install $$file ${MAN_DIR}/man1; fi; done
   318: 	echo "Stuff in misc has to be installed by hand"
   319: 
   320: 
   321: dummy:
   322: 	#Id: flx_maker.pak 1374 2007-04-13 18:40:51Z skaller 
   323: 
   324: .PHONY: dummy
   325: 
   326: #
   327: # ============== TARBALL MAKERS AND UPLOADERS ==============
   328: #
   329: # ------- TARBALL MAKERS --------------
   330: #
   331: 
   332: src_tarball: extract 
   333: 	rm -f felix-1.1.3_rc4
   334: 	ln -s . felix-1.1.3_rc4
   335: 	tar -cvf flx_1.1.3_rc4_src.tar\
   336: 		felix-1.1.3_rc4/configure \
   337: 		felix-1.1.3_rc4/mk \
   338: 		felix-1.1.3_rc4/autogen.sh \
   339: 		felix-1.1.3_rc4/*.bat \
   340: 		felix-1.1.3_rc4/Makefile \
   341: 		felix-1.1.3_rc4/README \
   342: 		felix-1.1.3_rc4/CONTENTS \
   343: 		felix-1.1.3_rc4/INSTALL \
   344: 		felix-1.1.3_rc4/VERSION \
   345: 		felix-1.1.3_rc4/LICENCE \
   346: 		felix-1.1.3_rc4/NEWS \
   347: 		felix-1.1.3_rc4/AUTHORS \
   348: 		felix-1.1.3_rc4/COPYING \
   349: 		felix-1.1.3_rc4/ChangeLog \
   350: 		felix-1.1.3_rc4/lpsrc/*.ipk \
   351: 		felix-1.1.3_rc4/lpsrc/*.pak \
   352: 		felix-1.1.3_rc4/interscript/*.py \
   353: 		felix-1.1.3_rc4/interscript/bin/*.py \
   354: 		felix-1.1.3_rc4/interscript/compilers/*.py \
   355: 		felix-1.1.3_rc4/interscript/core/*.py \
   356: 		felix-1.1.3_rc4/interscript/drivers/*.py \
   357: 		felix-1.1.3_rc4/interscript/drivers/sinks/*.py \
   358: 		felix-1.1.3_rc4/interscript/drivers/sources/*.py \
   359: 		felix-1.1.3_rc4/interscript/drivers/storage/*.py \
   360: 		felix-1.1.3_rc4/interscript/encoding/*.py \
   361: 		felix-1.1.3_rc4/interscript/frames/*.py \
   362: 		felix-1.1.3_rc4/interscript/frames/platform/*.py \
   363: 		felix-1.1.3_rc4/interscript/languages/*.py \
   364: 		felix-1.1.3_rc4/interscript/parsers/*.py \
   365: 		felix-1.1.3_rc4/interscript/tanglers/*.py \
   366: 		felix-1.1.3_rc4/interscript/tokenisers/*.py \
   367: 		felix-1.1.3_rc4/interscript/utilities/*.py \
   368: 		felix-1.1.3_rc4/interscript/weavers/*.py 
   369: 	gzip -9 flx_1.1.3_rc4_src.tar
   370: 	mv -f flx_1.1.3_rc4_src.tar.gz flx_1.1.3_rc4_src.tgz
   371: 
   372: media_tarball:
   373: 	rm -f flx_media.tgz
   374: 	tar -zcvf flx_media.tgz media
   375: 
   376: doc_tarball:
   377: 	rm -f flx_doc.tgz
   378: 	tar -zcvf flx_doc.tgz doc
   379: 
   380: speed_tarball:
   381: 	rm -f flx_speed.tgz
   382: 	tar -zcvf flx_speed.tgz speed/*.html speed/*.css speed/machine/*/images/*.jpg speed/machine/*/rankings/*.txt
   383: 
   384: #
   385: # ------- TARBALL FILES  --------------
   386: #
   387: flx_media.tgz: media_tarball
   388: 
   389: flx_doc.tgz: doc_tarball
   390: 
   391: flx_speed.tgz: speed_tarball
   392: 
   393: flx_1.1.3_rc4_src.tgz: src_tarball
   394: 
   395: tarballs: flx_1.1.3_rc4_src.tgz flx_speed.tgz flx_doc.tgz flx_media.tgz
   396: 
   397: #
   398: # ------- UPLOADERS --------------
   399: #
   400: #
   401: # ******* WEB SITE MISC
   402: #
   403: upload_images:
   404: 	scp homepage/images/*.jpg ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs/images
   405: 
   406: upload_homepage: dummy
   407: 	scp homepage/*.html ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs/
   408: 
   409: upload_www: upload_homepage
   410: 	scp www/*.html ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs/www
   411: 
   412: #
   413: # ******* LP SOURCE TARBALL
   414: #
   415: upload_src: flx_1.1.3_rc4_src.tgz
   416: 	scp flx_1.1.3_rc4_src.tgz ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs
   417: 
   418: #
   419: # ******* MEDIA REQUIRED FOR TESTS
   420: #
   421: upload_media: flx_media.tgz
   422: 	scp flx_media.tgz ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs
   423: 
   424: #
   425: # ******* SPEED TEST TARBALL
   426: #
   427: upload_speed: flx_speed.tgz
   428: 	scp -r flx_speed.tgz ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs/
   429: 
   430: #
   431: # ******* DOC TARBALL
   432: #
   433: upload_docs: flx_doc.tgz
   434: 	scp -r flx_doc.tgz ${USER}@felix.sf.net:/home/groups/f/fe/felix/htdocs/
   435: 
   436: # note: media is not uploaded here because it does not change much 
   437: upload: upload_src upload_speed upload_docs
   438: 
   439: #
   440: # --------- UNPACKER -----------------------
   441: #
   442: unpack:
   443: 	ssh ${USER}@felix.sf.net "(cd /home/groups/f/fe/felix/htdocs/; tar -zxvf flx_doc.tgz; tar -zxvf flx_speed.tgz)"
   444: 
   445: 
   446: 
   447: 
   448: 
   449: 
   450: 
End data section to Makefile[1]