Initial revision
This commit is contained in:
		
							parent
							
								
									c3b3faf7a4
								
							
						
					
					
						commit
						c02f977487
					
				
					 4 changed files with 133 additions and 0 deletions
				
			
		
							
								
								
									
										14
									
								
								lang/cem/libcc.ansi/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lang/cem/libcc.ansi/.distr
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
LIST
 | 
			
		||||
assert
 | 
			
		||||
ctype
 | 
			
		||||
errno
 | 
			
		||||
headers
 | 
			
		||||
locale
 | 
			
		||||
math
 | 
			
		||||
misc
 | 
			
		||||
setjmp
 | 
			
		||||
signal
 | 
			
		||||
stdio
 | 
			
		||||
stdlib
 | 
			
		||||
string
 | 
			
		||||
time
 | 
			
		||||
							
								
								
									
										13
									
								
								lang/cem/libcc.ansi/LIST
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								lang/cem/libcc.ansi/LIST
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
headers
 | 
			
		||||
misc
 | 
			
		||||
assert
 | 
			
		||||
stdio
 | 
			
		||||
stdlib
 | 
			
		||||
time
 | 
			
		||||
math
 | 
			
		||||
locale
 | 
			
		||||
string
 | 
			
		||||
ctype
 | 
			
		||||
setjmp
 | 
			
		||||
signal
 | 
			
		||||
errno
 | 
			
		||||
							
								
								
									
										65
									
								
								lang/cem/libcc.ansi/MakeArch
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										65
									
								
								lang/cem/libcc.ansi/MakeArch
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,65 @@
 | 
			
		|||
# $Header$
 | 
			
		||||
# This script makes an archive. The only option it knows is -o, which
 | 
			
		||||
# creates a library.
 | 
			
		||||
 | 
			
		||||
rm -f OLIST
 | 
			
		||||
 | 
			
		||||
case $# in
 | 
			
		||||
	0)
 | 
			
		||||
		AR=tar
 | 
			
		||||
		OLIB=libsrc
 | 
			
		||||
		echo 'cf libsrc' > OLIST
 | 
			
		||||
		;;
 | 
			
		||||
	1)
 | 
			
		||||
		if [ "X$1" != "X-o" ]
 | 
			
		||||
		then
 | 
			
		||||
			echo $0: unrecognised option, I only know -o >&2
 | 
			
		||||
			exit 1
 | 
			
		||||
		fi
 | 
			
		||||
		AR=$ASAR
 | 
			
		||||
		echo 'rv $OLIB' > OLIST
 | 
			
		||||
		;;
 | 
			
		||||
	*)
 | 
			
		||||
		echo $0: too many arguments >&2
 | 
			
		||||
		exit 1
 | 
			
		||||
		;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
if [ "X$AR" = "X" ]
 | 
			
		||||
then
 | 
			
		||||
echo EEK -- internal error, no archiver >&2
 | 
			
		||||
exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ $AR = tar ]
 | 
			
		||||
then
 | 
			
		||||
	echo LIST >> OLIST
 | 
			
		||||
	echo MakeArch >> OLIST
 | 
			
		||||
	echo Makefile >> OLIST
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
DIRS=`cat LIST`
 | 
			
		||||
 | 
			
		||||
for i in $DIRS
 | 
			
		||||
do
 | 
			
		||||
	cd $i
 | 
			
		||||
	if make "MACH=$MACH" "MACHFL=$MACHFL" $AR -f ../Makefile
 | 
			
		||||
	then
 | 
			
		||||
		cd ..
 | 
			
		||||
		if [ $AR = tar ]
 | 
			
		||||
		then
 | 
			
		||||
			echo $i/Makefile >> OLIST
 | 
			
		||||
			echo $i/LIST >> OLIST
 | 
			
		||||
		fi
 | 
			
		||||
		for j in `cat $i/OLIST`
 | 
			
		||||
		do
 | 
			
		||||
			echo $i/$j >> OLIST
 | 
			
		||||
		done
 | 
			
		||||
	else
 | 
			
		||||
		exit 1
 | 
			
		||||
	fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
#echo $AR `cat OLIST`
 | 
			
		||||
$AR `cat OLIST`
 | 
			
		||||
${RANLIB-:} $OLIB
 | 
			
		||||
							
								
								
									
										41
									
								
								lang/cem/libcc.ansi/Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								lang/cem/libcc.ansi/Makefile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,41 @@
 | 
			
		|||
# $Header$
 | 
			
		||||
# This Makefile is used for building the source archive as well as the
 | 
			
		||||
# actual library.
 | 
			
		||||
 | 
			
		||||
EMHOME=../../..
 | 
			
		||||
MACH=acc
 | 
			
		||||
MACHFL=-c.$(SUF) -O -L -Rcem=$(EMHOME)/lang/cem/libcc.new/main -I../headers \
 | 
			
		||||
	    $(DEFS)
 | 
			
		||||
PREF=ancc
 | 
			
		||||
SUB=
 | 
			
		||||
ASAR=arch
 | 
			
		||||
HEADSRC=$(HOME)
 | 
			
		||||
OLIB=tail_$(PREF)$(SUB)
 | 
			
		||||
 | 
			
		||||
libsrc:
 | 
			
		||||
	MakeArch
 | 
			
		||||
 | 
			
		||||
tail:	$(OLIB)
 | 
			
		||||
 | 
			
		||||
tailcp: tail
 | 
			
		||||
	../../install $(OLIB)
 | 
			
		||||
	rm -f $(OLIB)
 | 
			
		||||
 | 
			
		||||
$(OLIB):
 | 
			
		||||
	@echo translation test
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
libc:
 | 
			
		||||
	MACH=$(MACH) MACHFL="$(MACHFL) -LIB" ASAR=$(ASAR) \
 | 
			
		||||
		OLIB=$(OLIB) MakeArch -o
 | 
			
		||||
 | 
			
		||||
$(ASAR):
 | 
			
		||||
	@rm -f OLIST
 | 
			
		||||
	@sed 's/\.[ce]/.$(SUF)/' < LIST | sed '/\.h/D' > OLIST
 | 
			
		||||
	make "CC=$(MACH)" "MACHFL=$(MACHFL)" `cat OLIST`
 | 
			
		||||
 | 
			
		||||
# arch doesn't work recursively, tar does, which is what we actually want
 | 
			
		||||
tar:
 | 
			
		||||
	@rm -f OLIST
 | 
			
		||||
	make `cat LIST`
 | 
			
		||||
	cp LIST OLIST
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue