Permalink
Browse files

initial checkin, nothing much to see here.

Swift SVN r4
  • Loading branch information...
lattner committed Jul 18, 2010
1 parent 18844bc commit afc81c1855bf711315b8e5de02db138d3d487eeb
Showing with 194 additions and 0 deletions.
  1. +83 −0 Makefile
  2. +2 −0 lib/Lex/Lexer.cpp
  3. +23 −0 lib/Lex/Makefile
  4. +17 −0 lib/Makefile
  5. +19 −0 lib/Parse/Makefile
  6. +1 −0 lib/Parse/Parser.cpp
  7. +18 −0 tools/Makefile
  8. +28 −0 tools/swift/Makefile
  9. +3 −0 tools/swift/swift.cpp
View
@@ -0,0 +1,83 @@
+##===- Makefile --------------------------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+
+# If SWIFT_LEVEL is not set, then we are the top-level Makefile. Otherwise, we
+# are being included from a subdirectory makefile.
+
+ifndef SWIFT_LEVEL
+
+IS_TOP_LEVEL := 1
+SWIFT_LEVEL := .
+DIRS := lib tools # include docs
+
+PARALLEL_DIRS :=
+
+endif
+
+ifeq ($(MAKECMDGOALS),libs-only)
+ DIRS := $(filter-out tools docs, $(DIRS))
+ OPTIONAL_DIRS :=
+endif
+
+###
+# Common Makefile code, shared by all Swift Makefiles.
+
+# Set LLVM source root level.
+LEVEL := $(SWIFT_LEVEL)/../..
+
+# Include LLVM common makefile.
+include $(LEVEL)/Makefile.common

This comment has been minimized.

Show comment
Hide comment
@rubenfonseca

rubenfonseca Dec 6, 2015

Can you please tell me where can you find this file?

@rubenfonseca

rubenfonseca Dec 6, 2015

Can you please tell me where can you find this file?

+
+# Set common Swift build flags.
+CPP.Flags += -I$(PROJ_SRC_DIR)/$(SWIFT_LEVEL)/include \
+ -I$(PROJ_OBJ_DIR)/$(SWIFT_LEVEL)/include
+ifdef SWIFT_VENDOR
+CPP.Flags += -DSWIFT_VENDOR='"$(SWIFT_VENDOR) "'
+endif
+
+###
+# Swift Top Level specific stuff.
+
+ifeq ($(IS_TOP_LEVEL),1)
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+ $(Verb) if [ ! -f test/Makefile ]; then \
+ $(MKDIR) test; \
+ $(CP) $(PROJ_SRC_DIR)/test/Makefile test/Makefile; \
+ fi
+endif
+
+test::
+ @ $(MAKE) -C test
+
+report::
+ @ $(MAKE) -C test report
+
+clean::
+ @ $(MAKE) -C test clean
+
+libs-only: all
+
+tags::
+ $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \
+ grep -v /lib/Headers | grep -v /test/`
+
+cscope.files:
+ find tools lib include -name '*.cpp' \
+ -or -name '*.def' \
+ -or -name '*.td' \
+ -or -name '*.h' > cscope.files
+
+.PHONY: test report clean cscope.files
+
+endif
View
@@ -0,0 +1,2 @@
+int X;
+
View
@@ -0,0 +1,23 @@
+##===- swift/lib/Lex/Makefile ------------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+#
+# This implements the Lexer library for the C-Language front-end.
+#
+##===----------------------------------------------------------------------===##
+
+SWIFT_LEVEL := ../..
+include $(SWIFT_LEVEL)/../../Makefile.config

This comment has been minimized.

Show comment
Hide comment
@rubenfonseca

rubenfonseca Dec 6, 2015

Can you please tell me where can you find this file?

@rubenfonseca

rubenfonseca Dec 6, 2015

Can you please tell me where can you find this file?

+
+LIBRARYNAME := swiftLex
+
+include $(SWIFT_LEVEL)/Makefile
+
View
@@ -0,0 +1,17 @@
+##===- lib/Makefile ----------------------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+SWIFT_LEVEL := ..
+
+PARALLEL_DIRS = Lex Parse
+
+include $(SWIFT_LEVEL)/Makefile
+
View
@@ -0,0 +1,19 @@
+##===- swift/lib/Parse/Makefile ----------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+
+SWIFT_LEVEL := ../..
+include $(SWIFT_LEVEL)/../../Makefile.config
+
+LIBRARYNAME := swiftParse
+
+include $(SWIFT_LEVEL)/Makefile
+
View
@@ -0,0 +1 @@
+int x;
View
@@ -0,0 +1,18 @@
+##===- tools/Makefile --------------------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+
+SWIFT_LEVEL := ..
+DIRS := swift
+
+include $(SWIFT_LEVEL)/../../Makefile.config
+
+include $(SWIFT_LEVEL)/Makefile
View
@@ -0,0 +1,28 @@
+##===- tools/swift/Makefile -------------------------------*- Makefile -*-===##
+#
+# This source file is part of the Swift.org open source project
+#
+# Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
+# Licensed under Apache License v2.0 with Runtime Library Exception
+#
+# See http://swift.org/LICENSE.txt for license information
+# See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+#
+##===----------------------------------------------------------------------===##
+
+SWIFT_LEVEL := ../..
+
+TOOLNAME = swift
+
+# Include this here so we can get the configuration of the targets that have
+# been configured for construction. We have to do this early so we can set up
+# LINK_COMPONENTS before including Makefile.rules
+include $(SWIFT_LEVEL)/../../Makefile.config
+
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) bitwriter codegen ipo selectiondag
+#USEDLIBS = clangFrontend.a clangDriver.a clangCodeGen.a clangSema.a \
+# clangChecker.a clangAnalysis.a clangRewrite.a clangAST.a \
+# clangParse.a clangLex.a clangBasic.a
+
+include $(SWIFT_LEVEL)/Makefile
+
View
@@ -0,0 +1,3 @@
+
+int main() {
+}

36 comments on commit afc81c1

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Dec 3, 2015

2014 - 2015 copyright on a checkin from 2010, seems legit.

2014 - 2015 copyright on a checkin from 2010, seems legit.

@ZevEisenberg

This comment has been minimized.

Show comment
Hide comment
@ZevEisenberg

ZevEisenberg Dec 3, 2015

Always wondered whether it was called Swift from the start, or whether they came up with a name after they decided it was going to be their next language. Looks like the former!

Edit: oh, you mean the dodgy copyright is in this file. Yup, seems legit.

Always wondered whether it was called Swift from the start, or whether they came up with a name after they decided it was going to be their next language. Looks like the former!

Edit: oh, you mean the dodgy copyright is in this file. Yup, seems legit.

@jmkr

This comment has been minimized.

Show comment
Hide comment
@jmkr

jmkr Dec 3, 2015

ELI5: how would a commit from 2010 be altered to add the 2014-2015 copyright lines?

jmkr replied Dec 3, 2015

ELI5: how would a commit from 2010 be altered to add the 2014-2015 copyright lines?

@Dinduks

This comment has been minimized.

Show comment
Hide comment
@Dinduks

Dinduks Dec 3, 2015

@jmkr git rebase -i :)

@jmkr git rebase -i :)

@jonathonw

This comment has been minimized.

Show comment
Hide comment
@jonathonw

jonathonw Dec 3, 2015

Using git filter-branch (or similar) to run a script across all files and all revisions, to ensure that copyright notices and the like are applied consistently across the project.

This "breaks" the repository in the sense that object hashes are all going to change, but, since this is the first time this repo's been exposed to external contributors (and their internal repository where Apple actually does work is almost certainly different), that's not that big a deal.

Using git filter-branch (or similar) to run a script across all files and all revisions, to ensure that copyright notices and the like are applied consistently across the project.

This "breaks" the repository in the sense that object hashes are all going to change, but, since this is the first time this repo's been exposed to external contributors (and their internal repository where Apple actually does work is almost certainly different), that's not that big a deal.

@jmkr

This comment has been minimized.

Show comment
Hide comment
@jmkr

jmkr Dec 3, 2015

Very cool. Thanks guys!

jmkr replied Dec 3, 2015

Very cool. Thanks guys!

@jontayesp

This comment has been minimized.

Show comment
Hide comment

❤️

@caoer

This comment has been minimized.

Show comment
Hide comment

caoer replied Dec 3, 2015

👍

@kreshikhin

This comment has been minimized.

Show comment
Hide comment
@kreshikhin

kreshikhin Dec 3, 2015

That's one small commit for man, one giant push for mankind. %)

That's one small commit for man, one giant push for mankind. %)

@greg3z

This comment has been minimized.

Show comment
Hide comment
@greg3z

greg3z Dec 3, 2015

yeah, that copyright thing looks a bit anachronistic ^^

yeah, that copyright thing looks a bit anachronistic ^^

@jcanizales

This comment has been minimized.

Show comment
Hide comment
@pducks32

This comment has been minimized.

Show comment
Hide comment

👍

@Markypc3

This comment has been minimized.

Show comment
Hide comment
@Markypc3

Markypc3 Dec 3, 2015

Mkdir swift && cd swift
Git init
Build structures
Git add .
Git commit -m "svn checkin..."
And thus began the journey...

Mkdir swift && cd swift
Git init
Build structures
Git add .
Git commit -m "svn checkin..."
And thus began the journey...

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Dec 3, 2015

Git commit -m "svn checkin..."

lol, pretty sure it would have actually been an SVN checkin 😆

Git commit -m "svn checkin..."

lol, pretty sure it would have actually been an SVN checkin 😆

@rockshassa

This comment has been minimized.

Show comment
Hide comment
@rockshassa

rockshassa Dec 4, 2015

👍 epic commit msg

👍 epic commit msg

@raincoats

This comment has been minimized.

Show comment
Hide comment

c00l

@malhal

This comment has been minimized.

Show comment
Hide comment
@malhal

malhal Dec 4, 2015

5 years old already 🎂

5 years old already 🎂

@jayrparro

This comment has been minimized.

Show comment
Hide comment
@jayrparro

jayrparro Dec 4, 2015

woot! 🙌

woot! 🙌

@herkyl

This comment has been minimized.

Show comment
Hide comment

🎱

@techAPJ

This comment has been minimized.

Show comment
Hide comment
@techAPJ

techAPJ Dec 4, 2015

👏 👏

👏 👏

@axelandersson

This comment has been minimized.

Show comment
Hide comment
@axelandersson

axelandersson Dec 4, 2015

Posting in (hopefully) historical thread.

Posting in (hopefully) historical thread.

@alonecuzzo

This comment has been minimized.

Show comment
Hide comment

AMAZE

@dornad

This comment has been minimized.

Show comment
Hide comment

AMAZE^2

@ileacristian

This comment has been minimized.

Show comment
Hide comment

👍

@codestergit

This comment has been minimized.

Show comment
Hide comment
@codestergit

codestergit Dec 5, 2015

Contributor

Thanks for starting this ❤️

Contributor

codestergit replied Dec 5, 2015

Thanks for starting this ❤️

@timbroder

This comment has been minimized.

Show comment
Hide comment
@timbroder

timbroder Dec 5, 2015

awesome and inspiring

awesome and inspiring

@shahan312

This comment has been minimized.

Show comment
Hide comment

♥️

@ashishwt

This comment has been minimized.

Show comment
Hide comment

Sweet!

@qiaoxueshi

This comment has been minimized.

Show comment
Hide comment
@qiaoxueshi

qiaoxueshi Dec 7, 2015

Leave a footprint in the start of amazing Swift

Leave a footprint in the start of amazing Swift

@amachino

This comment has been minimized.

Show comment
Hide comment

🎉

@ndmeiri

This comment has been minimized.

Show comment
Hide comment

❤️

@andysolomon

This comment has been minimized.

Show comment
Hide comment

😇

@CoderXpert

This comment has been minimized.

Show comment
Hide comment

👍

@iMuks

This comment has been minimized.

Show comment
Hide comment
@iMuks

iMuks Mar 30, 2017

great...!!!

great...!!!

@CrazyFanFan

This comment has been minimized.

Show comment
Hide comment

I‘m late

@Liu-Jing-Jing

This comment has been minimized.

Show comment
Hide comment
@Liu-Jing-Jing

Liu-Jing-Jing Jan 8, 2018

2010 07 17 first commit

2010 07 17 first commit

Please sign in to comment.