Changeset 375a068


Ignore:
Timestamp:
Dec 14, 2016, 3:31:01 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
74e5a3aa
Parents:
37efaf5
Message:

move builtin/prelude into different directory

Files:
2 added
8 edited
7 moved

Legend:

Unmodified
Added
Removed
  • .gitignore

    r37efaf5 r375a068  
    2929src/driver/cfa-cpp
    3030
    31 src/libcfa/builtins.cf
    32 src/libcfa/extras.cf
     31src/prelude/builtins.cf
     32src/prelude/extras.cf
    3333src/libcfa/libcfa-prelude.c
    3434
  • Makefile.am

    r37efaf5 r375a068  
    1111## Created On       : Sun May 31 22:14:18 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Fri Jun 17 14:56:18 2016
    14 ## Update Count     : 13
     13## Last Modified On : Wed Dec 14 14:20:48 2016
     14## Update Count     : 15
    1515###############################################################################
    1616
    1717AUTOMAKE_OPTIONS = foreign              # do not require all the GNU file names
    18 SUBDIRS = src/driver src src/libcfa     # order important, src before libcfa because cfa-cpp used to build prelude
     18SUBDIRS = src/driver src src/prelude src/libcfa # order important, src before prelude because cfa-cpp used to build prelude
    1919EXTRA_DIST = Docs                       # non-source files
    2020BACKEND_CC = @BACKEND_CC@               # C compiler used to compile Cforall programs, versus C++ compiler used to build cfa command
  • Makefile.in

    r37efaf5 r375a068  
    235235top_srcdir = @top_srcdir@
    236236AUTOMAKE_OPTIONS = foreign              # do not require all the GNU file names
    237 SUBDIRS = src/driver src src/libcfa     # order important, src before libcfa because cfa-cpp used to build prelude
     237SUBDIRS = src/driver src src/prelude src/libcfa # order important, src before prelude because cfa-cpp used to build prelude
    238238EXTRA_DIST = Docs                       # non-source files
    239239MAINTAINERCLEANFILES = lib/* bin/* src/examples/.deps/* src/tests/.deps/* src/tests/.out/*
  • configure

    r37efaf5 r375a068  
    61846184
    61856185
    6186 ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/examples/Makefile src/tests/Makefile src/libcfa/Makefile"
     6186ac_config_files="$ac_config_files Makefile src/driver/Makefile src/Makefile src/examples/Makefile src/tests/Makefile src/prelude/Makefile src/libcfa/Makefile"
    61876187
    61886188
     
    69476947    "src/examples/Makefile") CONFIG_FILES="$CONFIG_FILES src/examples/Makefile" ;;
    69486948    "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;;
     6949    "src/prelude/Makefile") CONFIG_FILES="$CONFIG_FILES src/prelude/Makefile" ;;
    69496950    "src/libcfa/Makefile") CONFIG_FILES="$CONFIG_FILES src/libcfa/Makefile" ;;
    69506951
  • configure.ac

    r37efaf5 r375a068  
    192192        src/examples/Makefile
    193193        src/tests/Makefile
     194        src/prelude/Makefile
    194195        src/libcfa/Makefile
    195196        ])
  • src/libcfa/Makefile.am

    r37efaf5 r375a068  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Fri Aug 26 12:03:37 2016
    14 ## Update Count     : 199
     13## Last Modified On : Wed Dec 14 15:17:30 2016
     14## Update Count     : 211
    1515###############################################################################
    1616
     
    2828endif
    2929
    30 # put into lib for now
    31 cfalibdir = ${libdir}
    32 cfalib_DATA = builtins.cf extras.cf prelude.cf
    33 
    34 # create extra forward types/declarations to reduce inclusion of library files
    35 extras.cf : extras.regx extras.c
    36         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
    37 
    38 # create forward declarations for gcc builtins
    39 builtins.cf : builtins.c
    40         ${AM_V_GEN}if [ -e $< ] ; then \
    41                 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
    42         fi
    43 
    44 builtins.c : builtins.def prototypes.awk
    45         ${AM_V_GEN}if [ -e $< ] ; then \
    46                 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
    47         fi
    48 
    49 builtins.def :
    50 
    51 prototypes.awk :
    52 
    53 MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
    54 
    55 #--------------------------------------------------
    56 
    57 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
    58         ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    59 
    6030libcfa_a-libcfa-prelude.o : libcfa-prelude.c
    6131         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -O2 -c -o $@ $<
     
    6434         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -D__CFA_DEBUG__ -O0 -c -o $@ $<
    6535
    66 EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr       @CFA_FLAGS@
     36EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr @CFA_FLAGS@
    6737
    6838AM_CCASFLAGS = @CFA_FLAGS@
     
    7747% : %.c
    7848        @true
     49
     50# %.$(OJBEXT) : libcfa-prelude.c
     51#       echo "FRED"
     52#       @false
     53#       ${AM_V_CC} ${abs_top_srcdir}/src/driver/cfa
    7954
    8055concurrency/libcfa_a-invoke.o : concurrency/invoke.c
  • src/libcfa/Makefile.in

    r37efaf5 r375a068  
    1818######################## -*- Mode: Makefile-Automake -*- ######################
    1919###############################################################################
    20 
    2120
    2221
     
    8079         $(am__cd) "$$dir" && rm -f $$files; }; \
    8180  }
    82 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" \
    83         "$(DESTDIR)$(includedir)"
     81am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
    8482LIBRARIES = $(lib_LIBRARIES)
    8583AR = ar
     
    146144SOURCES = $(libcfa_d_a_SOURCES) $(libcfa_a_SOURCES)
    147145DIST_SOURCES = $(libcfa_d_a_SOURCES) $(libcfa_a_SOURCES)
    148 DATA = $(cfalib_DATA)
    149146HEADERS = $(nobase_include_HEADERS)
    150147ETAGS = etags
     
    273270AUTOMAKE_OPTIONS = subdir-objects
    274271lib_LIBRARIES = $(am__append_1) $(am__append_2)
    275 
    276 # put into lib for now
    277 cfalibdir = ${libdir}
    278 cfalib_DATA = builtins.cf extras.cf prelude.cf
    279 MAINTAINERCLEANFILES = builtins.cf extras.cf ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
    280 EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr       @CFA_FLAGS@
     272EXTRA_FLAGS = -g -Wall -Wno-unused-function -I${abs_top_srcdir}/src/libcfa/libhdr @CFA_FLAGS@
    281273AM_CCASFLAGS = @CFA_FLAGS@
    282274headers = limits stdlib math iostream fstream iterator rational assert containers/vector concurrency/threads
     
    769761@AMDEP_TRUE@@am__fastdepCC_FALSE@       DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    770762@am__fastdepCC_FALSE@   $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-invoke.obj `if test -f 'concurrency/invoke.c'; then $(CYGPATH_W) 'concurrency/invoke.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/invoke.c'; fi`
    771 install-cfalibDATA: $(cfalib_DATA)
    772         @$(NORMAL_INSTALL)
    773         test -z "$(cfalibdir)" || $(MKDIR_P) "$(DESTDIR)$(cfalibdir)"
    774         @list='$(cfalib_DATA)'; test -n "$(cfalibdir)" || list=; \
    775         for p in $$list; do \
    776           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
    777           echo "$$d$$p"; \
    778         done | $(am__base_list) | \
    779         while read files; do \
    780           echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cfalibdir)'"; \
    781           $(INSTALL_DATA) $$files "$(DESTDIR)$(cfalibdir)" || exit $$?; \
    782         done
    783 
    784 uninstall-cfalibDATA:
    785         @$(NORMAL_UNINSTALL)
    786         @list='$(cfalib_DATA)'; test -n "$(cfalibdir)" || list=; \
    787         files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
    788         dir='$(DESTDIR)$(cfalibdir)'; $(am__uninstall_files_from_dir)
    789763install-nobase_includeHEADERS: $(nobase_include_HEADERS)
    790764        @$(NORMAL_INSTALL)
     
    893867check-am: all-am
    894868check: check-am
    895 all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS)
     869all-am: Makefile $(LIBRARIES) $(HEADERS)
    896870installdirs:
    897         for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" "$(DESTDIR)$(includedir)"; do \
     871        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
    898872          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
    899873        done
     
    933907        @echo "This command is intended for maintainers to use"
    934908        @echo "it deletes files that may require special tools to rebuild."
    935         -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
    936909clean: clean-am
    937910
     
    956929info-am:
    957930
    958 install-data-am: install-cfalibDATA install-nobase_includeHEADERS
     931install-data-am: install-nobase_includeHEADERS
    959932
    960933install-dvi: install-dvi-am
     
    1002975ps-am:
    1003976
    1004 uninstall-am: uninstall-cfalibDATA uninstall-libLIBRARIES \
    1005         uninstall-nobase_includeHEADERS
     977uninstall-am: uninstall-libLIBRARIES uninstall-nobase_includeHEADERS
    1006978
    1007979.MAKE: install-am install-strip
     
    1010982        clean-libLIBRARIES ctags distclean distclean-compile \
    1011983        distclean-generic distclean-tags distdir dvi dvi-am html \
    1012         html-am info info-am install install-am install-cfalibDATA \
    1013         install-data install-data-am install-dvi install-dvi-am \
    1014         install-exec install-exec-am install-html install-html-am \
    1015         install-info install-info-am install-libLIBRARIES install-man \
     984        html-am info info-am install install-am install-data \
     985        install-data-am install-dvi install-dvi-am install-exec \
     986        install-exec-am install-html install-html-am install-info \
     987        install-info-am install-libLIBRARIES install-man \
    1016988        install-nobase_includeHEADERS install-pdf install-pdf-am \
    1017989        install-ps install-ps-am install-strip installcheck \
     
    1019991        maintainer-clean-generic maintainer-clean-local mostlyclean \
    1020992        mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
    1021         tags uninstall uninstall-am uninstall-cfalibDATA \
    1022         uninstall-libLIBRARIES uninstall-nobase_includeHEADERS
    1023 
    1024 
    1025 # create extra forward types/declarations to reduce inclusion of library files
    1026 extras.cf : extras.regx extras.c
    1027         ${AM_V_GEN}@BACKEND_CC@ @CFA_FLAGS@ -E ${srcdir}/extras.c | grep -f extras.regx > ${srcdir}/extras.cf
    1028 
    1029 # create forward declarations for gcc builtins
    1030 builtins.cf : builtins.c
    1031         ${AM_V_GEN}if [ -e $< ] ; then \
    1032                 @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \
    1033         fi
    1034 
    1035 builtins.c : builtins.def prototypes.awk
    1036         ${AM_V_GEN}if [ -e $< ] ; then \
    1037                 @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \
    1038         fi
    1039 
    1040 builtins.def :
    1041 
    1042 prototypes.awk :
    1043 
    1044 #--------------------------------------------------
    1045 
    1046 libcfa-prelude.c : ${srcdir}/prelude.cf ${srcdir}/extras.cf ${srcdir}/builtins.cf
    1047         ${AM_V_GEN}${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     993        tags uninstall uninstall-am uninstall-libLIBRARIES \
     994        uninstall-nobase_includeHEADERS
     995
    1048996
    1049997libcfa_a-libcfa-prelude.o : libcfa-prelude.c
     
    10571005        @true
    10581006
     1007# %.$(OJBEXT) : libcfa-prelude.c
     1008#       echo "FRED"
     1009#       @false
     1010#       ${AM_V_CC} ${abs_top_srcdir}/src/driver/cfa
     1011
    10591012concurrency/libcfa_a-invoke.o : concurrency/invoke.c
    10601013        ${AM_V_CC}@BACKEND_CC@ -DHAVE_CONFIG_H -I. -I../.. -O2 ${EXTRA_FLAGS} -c -o $@ $<
  • src/main.cc

    r37efaf5 r375a068  
    1010// Created On       : Fri May 15 23:12:02 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Oct 30 10:11:38 2016
    13 // Update Count     : 435
     12// Last Modified On : Wed Dec 14 14:35:54 2016
     13// Update Count     : 436
    1414//
    1515
     
    178178                if ( ! nopreludep ) {                                                   // include gcc builtins
    179179                        // -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
    180                         FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     180                        FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    181181                        assertf( builtins, "cannot open builtins.cf\n" );
    182182                        parse( builtins, LinkageSpec::Compiler );
    183183
    184184                        // read the extra prelude in, if not generating the cfa library
    185                         FILE * extras = fopen( libcfap | treep ? "extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
     185                        FILE * extras = fopen( libcfap | treep ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
    186186                        assertf( extras, "cannot open extras.cf\n" );
    187187                        parse( extras, LinkageSpec::C );
     
    189189                        if ( ! libcfap ) {
    190190                                // read the prelude in, if not generating the cfa library
    191                                 FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
     191                                FILE * prelude = fopen( treep ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
    192192                                assertf( prelude, "cannot open prelude.cf\n" );
    193193                                parse( prelude, LinkageSpec::Intrinsic );
Note: See TracChangeset for help on using the changeset viewer.