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