$ git clone https://gist.github.com/5480012.git chapter1
$ cd chapter1
# create new file
$ make new TARGET=q1
$ ls
0-My-SICP-Template-README.md Makefile README.md q1.scm template.scm utils.scm
# solve
$ vim q1.scm
# check
$ make q1
gosh q1.scm
q1========================================
q1========================================/
$ make new TARGET=q2
$ vim q2.scm
$ make q2
gosh q2.scm
q2========================================
q2========================================/
# check all
$ make
gosh q1.scm
q1========================================
q1========================================/
gosh q2.scm
q2========================================
q2========================================/
Last active
December 16, 2015 18:48
-
-
Save mururu/5480012 to your computer and use it in GitHub Desktop.
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test: | |
| new: $(TARGET).scm | |
| $(TARGET).scm: | |
| sed -i "" "1s/^\(test:.*\)$$/\1 $(TARGET)/" Makefile | |
| sed -e "s/q\.num/$(TARGET)/g" ./template.scm > $(TARGET).scm | |
| echo '\n$(TARGET):\n\tgosh $(TARGET).scm' >> Makefile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ====== q.num | |
| (load "./utils.scm") | |
| (start "q.num") | |
| (finish "q.num") | |
| ; ======/q.num |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define false #f) | |
| (define true #t) | |
| (define (p a) | |
| (print a)) | |
| (define (pb a) | |
| (print a) | |
| (print "")) | |
| (define (start a) | |
| (display a) | |
| (pb "========================================")) | |
| (define (finish a) | |
| (display a) | |
| (pb "========================================/")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment