Finish the build infrastructure for separate linking.
This commit is contained in:
		
							parent
							
								
									a700e483db
								
							
						
					
					
						commit
						3697f5169d
					
				
					 12 changed files with 77 additions and 22 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							|  | @ -2,3 +2,4 @@ | ||||||
| *.o | *.o | ||||||
| *.so | *.so | ||||||
| *.import.scm | *.import.scm | ||||||
|  | brmsaptool | ||||||
|  |  | ||||||
							
								
								
									
										49
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										49
									
								
								Makefile
									
										
									
									
									
								
							|  | @ -23,43 +23,48 @@ | ||||||
| # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 | ||||||
| #
 | #
 | ||||||
| 
 | 
 | ||||||
|  | brmsaptool: brmsaptool.o testing.o listing.o month.o period.o ansi.o	\ | ||||||
|  | 		member-file.o dictionary.o command-line.o | ||||||
|  | 	csc -o brmsaptool $^ | ||||||
| 
 | 
 | ||||||
| .PHONY: all | .PHONY: clean | ||||||
| all: testing.so testing.import.scm listing.so listing.import.scm	\ | clean: | ||||||
| 		month.so month.import.scm period.so period.import.scm	\
 | 	rm -f *.o *.import.scm brmsaptool | ||||||
| 		ansi.so ansi.import.scm member-file.so			\
 |  | ||||||
| 		member-file.import.scm dictionary.so			\
 |  | ||||||
| 		dictionary.import.scm |  | ||||||
| 
 | 
 | ||||||
| ################################################################
 | ################################################################
 | ||||||
| # Module shared object and import source compilation
 | # Module shared object and import source compilation
 | ||||||
| 
 | 
 | ||||||
| %.so: %.scm | %.o: %.scm | ||||||
| 	csc -s $< | 	csc -c $< | ||||||
| 
 | 
 | ||||||
| %.import.scm: %.scm | %.import.scm: %.scm | ||||||
| 	csc -J $< | 	csc -c -J $< | ||||||
| 
 | 
 | ||||||
| ################################################################
 | ################################################################
 | ||||||
| # Modules
 | # Modules
 | ||||||
| 
 | 
 | ||||||
| testing.so: testing.scm | testing.o: testing.scm | ||||||
| testing.import.scm: testing.scm | testing.import.scm: testing.scm | ||||||
| 
 | 
 | ||||||
| listing.so: listing.scm | listing.o: listing.scm testing.import.scm | ||||||
| listing.import.scm: listing.scm | listing.import.scm: listing.scm testing.import.scm | ||||||
| 
 | 
 | ||||||
| dictionary.so: dictionary.scm | dictionary.o: dictionary.scm testing.import.scm | ||||||
| dictionary.import.scm: dictionary.scm | dictionary.import.scm: dictionary.scm testing.import.scm | ||||||
| 
 | 
 | ||||||
| month.so: month.scm | month.o: month.scm testing.import.scm | ||||||
| month.import.scm: month.scm | month.import.scm: month.scm testing.import.scm | ||||||
| 
 | 
 | ||||||
| period.so: period.scm | period.o: period.scm testing.import.scm month.import.scm | ||||||
| period.import.scm: period.scm | period.import.scm: period.scm testing.import.scm month.import.scm | ||||||
| 
 | 
 | ||||||
| ansi.so: ansi.scm | ansi.o: ansi.scm testing.import.scm | ||||||
| ansi.import.scm: ansi.scm | ansi.import.scm: ansi.scm testing.import.scm | ||||||
| 
 | 
 | ||||||
| member-file.so: member-file.scm dictionary.import.scm ansi.import.scm | member-file.o: member-file.scm dictionary.import.scm ansi.import.scm month.import.scm period.import.scm listing.import.scm testing.import.scm | ||||||
| member-file.import.scm: member-file.scm dictionary.import.scm ansi.import.scm | member-file.import.scm: member-file.scm dictionary.import.scm ansi.import.scm month.import.scm period.import.scm listing.import.scm testing.import.scm | ||||||
|  | 
 | ||||||
|  | command-line.o: command-line.scm testing.import.scm | ||||||
|  | command-line.import.scm: command-line.scm testing.import.scm | ||||||
|  | 
 | ||||||
|  | brmsaptool.o: brmsaptool.scm testing.import.scm listing.import.scm dictionary.import.scm month.import.scm period.import.scm ansi.import.scm member-file.import.scm command-line.import.scm | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								ansi.scm
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								ansi.scm
									
										
									
									
									
								
							|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit ansi)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  ansi |  ansi | ||||||
|  ( |  ( | ||||||
|  |  | ||||||
|  | @ -23,6 +23,15 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | ;(declare (uses testing | ||||||
|  | ;	       listing | ||||||
|  | ;	       dictionary | ||||||
|  | ;	       month | ||||||
|  | ;	       period | ||||||
|  | ;	       member-file | ||||||
|  | ;	       command-line | ||||||
|  | ;	       ansi)) | ||||||
|  | 
 | ||||||
| (import testing | (import testing | ||||||
| 	listing | 	listing | ||||||
| 	dictionary | 	dictionary | ||||||
|  |  | ||||||
|  | @ -1,4 +1,28 @@ | ||||||
| #!/bin/sh | #!/bin/sh | ||||||
|  | # | ||||||
|  | # brmsaptool.sh | ||||||
|  | # | ||||||
|  | # Runs the tool as Scheme script using csi. | ||||||
|  | # | ||||||
|  | # ISC License | ||||||
|  | # | ||||||
|  | # Copyright 2023 Brmlab, z.s. | ||||||
|  | # Dominik Pantůček <dominik.pantucek@trustica.cz> | ||||||
|  | # | ||||||
|  | # Permission to use, copy, modify, and/or distribute this software | ||||||
|  | # for any purpose with or without fee is hereby granted, provided | ||||||
|  | # that the above copyright notice and this permission notice appear | ||||||
|  | # in all copies. | ||||||
|  | #  | ||||||
|  | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL | ||||||
|  | # WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED | ||||||
|  | # WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE | ||||||
|  | # AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR | ||||||
|  | # CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS | ||||||
|  | # OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, | ||||||
|  | # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN | ||||||
|  | # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
|  | # | ||||||
| 
 | 
 | ||||||
| csi -q -b \ | csi -q -b \ | ||||||
|     testing.scm \ |     testing.scm \ | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit command-line)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  command-line |  command-line | ||||||
|  (command-line |  (command-line | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit dictionary)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  dictionary |  dictionary | ||||||
|  ( |  ( | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit listing)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  listing (print-source-listing listing-tests!) |  listing (print-source-listing listing-tests!) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit member-file)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  member-file |  member-file | ||||||
|  ( |  ( | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit month)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  month |  month | ||||||
|  ( |  ( | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit period)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  period |  period | ||||||
|  ( |  ( | ||||||
|  |  | ||||||
|  | @ -23,6 +23,8 @@ | ||||||
| ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||||
| ;; | ;; | ||||||
| 
 | 
 | ||||||
|  | (declare (unit testing)) | ||||||
|  | 
 | ||||||
| (module | (module | ||||||
|  testing |  testing | ||||||
|  (test-eq? test-equal? test-exn test-true test-false run-tests) |  (test-eq? test-equal? test-exn test-true test-false run-tests) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue