newer version
This commit is contained in:
		
							parent
							
								
									697ea6d946
								
							
						
					
					
						commit
						5f638d7aac
					
				
					 4 changed files with 21 additions and 23 deletions
				
			
		
							
								
								
									
										8
									
								
								lang/m2/comp/MakeVersion
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										8
									
								
								lang/m2/comp/MakeVersion
									
										
									
									
									
										Executable file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| V=`cat Version.c` | ||||
| VERSION=`expr "$V" ':' '.*[0-9][0-9]*\.\([0-9][0-9]*\).*'` | ||||
| NEWVERSION=`expr $VERSION + 1` | ||||
| sed "s/\.$VERSION/.$NEWVERSION/" < Version.c > tmp$$ | ||||
| mv tmp$$ Version.c | ||||
| CM "$*" | ||||
| V=`cat Version.c` | ||||
| SV > ../versions/V`expr "$V" ':' '.*\([0-9][0-9]*\.[0-9][0-9]*\).*'` | ||||
|  | @ -50,24 +50,15 @@ all:	Cfiles | |||
| 	@rm -f nmclash.o a.out | ||||
| 
 | ||||
| clean: | ||||
| 	rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab cclash.o cid.o cclash cid clashes | ||||
| 	rm -f $(OBJ) $(GENFILES) LLfiles hfiles Cfiles tab clashes | ||||
| 	(cd .. ; rm -rf Xsrc) | ||||
| 
 | ||||
| lint:	Cfiles | ||||
| 	sh -c 'if $(CC) nmclash.c > /dev/null 2>&1 ; then make Xlint ; else sh Resolve Xlint ; fi' | ||||
| 	@rm -f nmclash.o a.out | ||||
| 
 | ||||
| mkdep:	mkdep.o | ||||
| 	$(CC) $(LFLAGS) -o mkdep mkdep.o | ||||
| 
 | ||||
| cclash:	cclash.o | ||||
| 	$(CC) $(LFLAGS) -o cclash cclash.o | ||||
| 
 | ||||
| clashes:	$(SRC) $(HFILES) | ||||
| 	sh -c 'if test -f clashes ; then ./cclash -l7 clashes $? > Xclashes ; mv Xclashes clashes ; else ./cclash -l7 $? > clashes ; fi' | ||||
| 
 | ||||
| cid:	cid.o | ||||
| 	$(CC) $(LFLAGS) -o cid cid.o | ||||
| 	sh -c 'if test -f clashes ; then cclash -l7 clashes $? > Xclashes ; mv Xclashes clashes ; else cclash -l7 $? > clashes ; fi' | ||||
| 
 | ||||
| # entry points not to be used directly
 | ||||
| 
 | ||||
|  | @ -119,10 +110,10 @@ char.c: ../src/char.tab ../src/tab | |||
| ../src/tab:  | ||||
| 	$(CC) ../src/tab.c -o ../src/tab | ||||
| 
 | ||||
| depend:	mkdep | ||||
| depend: | ||||
| 	sed '/^#AUTOAUTO/,$$d' Makefile > Makefile.new | ||||
| 	echo '#AUTOAUTOAUTOAUTOAUTOAUTOAUTOAUTO' >> Makefile.new | ||||
| 	./mkdep $(SRC) |\
 | ||||
| 	mkdep $(SRC) |\
 | ||||
| 		sed 's/\.c:/\.o:/' >> Makefile.new | ||||
| 	mv Makefile Makefile.old | ||||
| 	mv Makefile.new Makefile | ||||
|  |  | |||
|  | @ -6,9 +6,7 @@ case $# in | |||
| 	;; | ||||
| esac | ||||
| case $1 in | ||||
| main) | ||||
| 	;; | ||||
| Xlint) | ||||
| main|Xlint) | ||||
| 	;; | ||||
| *)	echo "$0: $1: Illegal argument" 1>&2 | ||||
| 	exit 1 | ||||
|  | @ -19,10 +17,11 @@ then | |||
| 	: | ||||
| else	mkdir ../Xsrc | ||||
| fi | ||||
| make cclash clashes cid | ||||
| make clashes | ||||
| sed '/^C_/d' < clashes > tmp$$ | ||||
| ./cclash -c -l7 tmp$$ > ../Xsrc/Xclashes | ||||
| rm -f tmp$$ | ||||
| PW=`pwd` | ||||
| cd ../Xsrc | ||||
| if cmp -s Xclashes clashes | ||||
| then | ||||
|  | @ -31,13 +30,13 @@ else | |||
| 	mv Xclashes clashes | ||||
| fi | ||||
| rm -f Makefile | ||||
| for i in `cat ../src/Cfiles` | ||||
| for i in `cat $PW/Cfiles` | ||||
| do | ||||
| 	cat >> Makefile <<EOF | ||||
| $i:	clashes ../src/$i | ||||
| 	../src/cid -Fclashes < ../src/$i > $i | ||||
| $i:	clashes $PW/$i | ||||
| 	cid -Fclashes < $PW/$i > $i | ||||
| 
 | ||||
| EOF | ||||
| done | ||||
| make `cat ../src/Cfiles` | ||||
| make -f ../src/Makefile $1 | ||||
| make `cat $PW/Cfiles` | ||||
| make -f $PW/Makefile $1 | ||||
|  |  | |||
|  | @ -1 +1 @@ | |||
| char Version[] = "Version 0.5"; | ||||
| char Version[] = "Version 0.6"; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue