Changes in / [9bb81bb8:39f04ec]
- Location:
- src
- Files:
-
- 2 added
- 2 deleted
- 4 edited
-
libcfa/Makefile.am (modified) (4 diffs)
-
libcfa/Makefile.in (modified) (5 diffs)
-
libcfa/builtins.cf (added)
-
libcfa/extras.c (deleted)
-
libcfa/extras.regx (deleted)
-
libcfa/ptrdiff_t.c (added)
-
libcfa/stdlib (modified) (2 diffs)
-
main.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/Makefile.am
r9bb81bb8 r39f04ec 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Tue Jul 5 16:19:31201614 ## Update Count : 1 7813 ## Last Modified On : Mon Jun 13 14:27:22 2016 14 ## Update Count : 166 15 15 ############################################################################### 16 16 … … 19 19 # put into lib for now 20 20 cfalibdir = ${libdir} 21 cfalib_DATA = builtins.cf extras.cf prelude.cf21 cfalib_DATA = prelude.cf builtins.cf 22 22 23 23 # create forward declarations for gcc builtins 24 extras.cf : extras.regx extras.c 25 @BACKEND_CC@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 24 ${libdir}/builtins.cf : ${libdir} ${srcdir}/builtins.cf 25 ${INSTALL} ${srcdir}/builtins.cf ${libdir} 26 sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ${srcdir}/ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" ${srcdir}/prelude.cf 26 27 27 28 builtins.cf : builtins.c 28 if [ -e $< ] ; then \29 @if [ -e $< ] ; then \ 29 30 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 30 31 fi 31 32 32 33 builtins.c : builtins.def prototypes.awk 33 if [ -e $< ] ; then \34 @if [ -e $< ] ; then \ 34 35 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 35 36 fi … … 39 40 prototypes.awk : 40 41 41 MAINTAINERCLEANFILES = builtins.cf extras.cf${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}42 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 42 43 43 44 #-------------------------------------------------- 44 45 45 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf46 libcfa-prelude.c : ${srcdir}/prelude.cf 46 47 ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 47 48 … … 63 64 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} 64 65 65 nobase_include_HEADERS = ${headers} stdio.h66 nobase_include_HEADERS = ${headers} 66 67 67 68 CLEANFILES = libcfa-prelude.c 68 69 maintainer-clean-local: 70 -rm -rf ${includedir}/* 69 MAINTAINERCLEANFILES += ${includedir}/* -
src/libcfa/Makefile.in
r9bb81bb8 r39f04ec 230 230 # put into lib for now 231 231 cfalibdir = ${libdir} 232 cfalib_DATA = builtins.cf extras.cf prelude.cf 233 MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}} 232 cfalib_DATA = prelude.cf builtins.cf 233 MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} \ 234 ${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/* 234 235 headers = limits stdlib math iostream fstream iterator rational containers/vector 235 236 libobjs = ${headers:=.o} 236 237 libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c} 237 nobase_include_HEADERS = ${headers} stdio.h238 nobase_include_HEADERS = ${headers} 238 239 CLEANFILES = libcfa-prelude.c 239 240 all: all-am … … 563 564 -rm -rf ./$(DEPDIR) 564 565 -rm -f Makefile 565 maintainer-clean-am: distclean-am maintainer-clean-generic \ 566 maintainer-clean-local 566 maintainer-clean-am: distclean-am maintainer-clean-generic 567 567 568 568 mostlyclean: mostlyclean-am … … 593 593 install-ps install-ps-am install-strip installcheck \ 594 594 installcheck-am installdirs maintainer-clean \ 595 maintainer-clean-generic m aintainer-clean-local mostlyclean\596 mostlyclean- compile mostlyclean-generic pdf pdf-am ps ps-am\597 tags uninstall uninstall-am uninstall-cfalibDATA\598 uninstall- libLIBRARIES uninstall-nobase_includeHEADERS595 maintainer-clean-generic mostlyclean mostlyclean-compile \ 596 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ 597 uninstall-am uninstall-cfalibDATA uninstall-libLIBRARIES \ 598 uninstall-nobase_includeHEADERS 599 599 600 600 601 601 # create forward declarations for gcc builtins 602 extras.cf : extras.regx extras.c 603 @BACKEND_CC@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf 602 ${libdir}/builtins.cf : ${libdir} ${srcdir}/builtins.cf 603 ${INSTALL} ${srcdir}/builtins.cf ${libdir} 604 sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ${srcdir}/ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" ${srcdir}/prelude.cf 604 605 605 606 builtins.cf : builtins.c 606 if [ -e $< ] ; then \607 @if [ -e $< ] ; then \ 607 608 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ 608 609 fi 609 610 610 611 builtins.c : builtins.def prototypes.awk 611 if [ -e $< ] ; then \612 @if [ -e $< ] ; then \ 612 613 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ 613 614 fi … … 619 620 #-------------------------------------------------- 620 621 621 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf622 libcfa-prelude.c : ${srcdir}/prelude.cf 622 623 ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@ # use src/cfa-cpp as not in lib until after install 623 624 … … 631 632 ${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp # add dependency to cfa-cpp so all libraries are rebuilt with new translator 632 633 633 maintainer-clean-local:634 -rm -rf ${includedir}/*635 636 634 # Tell versions [3.59,3.63) of GNU make to not export all variables. 637 635 # Otherwise a system limit (for SysV at least) may be exceeded. -
src/libcfa/stdlib
r9bb81bb8 r39f04ec 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T ue Jul 5 09:56:31201613 // Update Count : 9 812 // Last Modified On : Thu Jun 30 15:04:18 2016 13 // Update Count : 97 14 14 // 15 16 //--------------------------------------- 17 18 extern "C" { 19 #include <stddef.h> // size_t 20 } // extern "C" 15 21 16 22 //--------------------------------------- … … 21 27 #define EXIT_SUCCESS 0 // successful exit status 22 28 #endif // ! EXIT_FAILURE 29 void exit( int rc ); 30 void abort( void ); 23 31 } // extern "C" 24 32 -
src/main.cc
r9bb81bb8 r39f04ec 10 10 // Created On : Fri May 15 23:12:02 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Jul 5 15:23:11201613 // Update Count : 20 912 // Last Modified On : Sun Jun 5 15:57:30 2016 13 // Update Count : 205 14 14 // 15 15 … … 214 214 Parser::get_parser().set_debug( grammarp ); 215 215 216 // read in the builtins , extras,and the prelude216 // read in the builtins and the prelude 217 217 if ( ! nopreludep ) { // include gcc builtins 218 218 // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here. … … 222 222 exit( EXIT_FAILURE ); 223 223 } // if 224 224 225 parse( builtins, LinkageSpec::Compiler ); 225 226 // read the extra prelude in, if not generating the cfa library227 FILE * extras = fopen( libcfap | treep ? "extras.cf" : CFA_LIBDIR "/extras.cf", "r" );228 if ( extras == NULL ) {229 std::cerr << "Error: can't open extras.cf" << std::endl;230 exit( EXIT_FAILURE );231 } // if232 parse( extras, LinkageSpec::C );233 226 234 227 if ( ! libcfap ) {
Note:
See TracChangeset
for help on using the changeset viewer.