added 'dist' target, and minor cleanup REL_0_10

Tue, 21 Jan 2003 18:53:48 +0000

author
eric
date
Tue, 21 Jan 2003 18:53:48 +0000
changeset 51
3398476bbedd
parent 50
efbc5e0957df
child 52
7a996a86036d

added 'dist' target, and minor cleanup

Makefile file | annotate | diff | revisions
     1.1 diff -r efbc5e0957df -r 3398476bbedd Makefile
     1.2 --- a/Makefile	Tue Jan 21 18:39:55 2003 +0000
     1.3 +++ b/Makefile	Tue Jan 21 18:53:48 2003 +0000
     1.4 @@ -1,6 +1,6 @@
     1.5  # t2p: build a PDF file out of one or more TIFF Class F Group 4 files
     1.6  # Makefile
     1.7 -# $Id: Makefile,v 1.10 2002/08/25 22:03:55 eric Exp $
     1.8 +# $Id: Makefile,v 1.11 2003/01/21 10:53:48 eric Exp $
     1.9  # Copyright 2001 Eric Smith <eric@brouhaha.com>
    1.10  #
    1.11  # This program is free software; you can redistribute it and/or modify
    1.12 @@ -24,16 +24,42 @@
    1.13  YACC = bison
    1.14  YFLAGS = -d -v
    1.15  
    1.16 -SRCS = bitblt.c bitblt_test.c t2p.c semantics.c
    1.17 -HDRS = bitblt.h t2p.h semantics.h
    1.18 -MISC = Makefile scanner.l parser.y
    1.19 +# -----------------------------------------------------------------------------
    1.20 +# You shouldn't have to change anything below this point, but if you do please
    1.21 +# let me know why so I can improve this Makefile.
    1.22 +# -----------------------------------------------------------------------------
    1.23 +
    1.24 +VERSION = 0.1
    1.25 +
    1.26 +PACKAGE = t2p
    1.27  
    1.28  TARGETS = t2p bitblt_test
    1.29  
    1.30 -AUTO_SRCS = scanner.c parser.tab.c
    1.31 +CSRCS = t2p.c semantics.c bitblt.c bitblt_test.c
    1.32 +OSRCS = scanner.l parser.y
    1.33 +HDRS = t2p.h semantics.h bitblt.h 
    1.34 +MISC = COPYING Makefile
    1.35 +
    1.36 +DISTFILES = $(MISC) $(HDRS) $(CSRCS) $(OSRCS)
    1.37 +DISTNAME = $(PACKAGE)-$(VERSION)
    1.38 +
    1.39 +
    1.40 +AUTO_CSRCS = scanner.c parser.tab.c
    1.41  AUTO_HDRS = parser.tab.h
    1.42  AUTO_MISC = parser.output
    1.43  
    1.44 +
    1.45 +all: $(TARGETS)
    1.46 +
    1.47 +
    1.48 +dist: $(DISTFILES)
    1.49 +	-rm -rf $(DISTNAME)
    1.50 +	mkdir $(DISTNAME)
    1.51 +	for f in $(DISTFILES); do ln $$f $(DISTNAME)/$$f; done
    1.52 +	tar --gzip -chf $(DISTNAME).tar.gz $(DISTNAME)
    1.53 +	-rm -rf $(DISTNAME)
    1.54 +
    1.55 +
    1.56  t2p: t2p.o scanner.o semantics.o parser.tab.o bitblt.o
    1.57  
    1.58  bitblt_test: bitblt_test.o bitblt.o
    1.59 @@ -47,10 +73,10 @@
    1.60  		*~ *.pdf
    1.61  
    1.62  wc:
    1.63 -	wc -l $(SRCS) $(HDRS) $(MISC)
    1.64 +	wc -l $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
    1.65  
    1.66  ls-lt:
    1.67 -	ls -lt $(SRCS) $(HDRS) $(MISC)
    1.68 +	ls -lt $(HDRS) $(CSRCS) $(OSRCS) $(MISC)
    1.69  
    1.70  
    1.71  %.tab.c %.tab.h %.output: %.y
    1.72 @@ -60,9 +86,9 @@
    1.73  # 	$(LEX) $(LFLAGS) $<
    1.74  
    1.75  
    1.76 -ALL_SRCS = $(SRCS) $(AUTO_SRCS)
    1.77 +ALL_CSRCS = $(CSRCS) $(AUTO_CSRCS)
    1.78  
    1.79 -DEPENDS = $(ALL_SRCS:.c=.d)
    1.80 +DEPENDS = $(ALL_CSRCS:.c=.d)
    1.81  
    1.82  %.d: %.c
    1.83  	$(CC) -M -MG $(CFLAGS) $< | sed -e 's@ /[^ ]*@@g' -e 's@^\(.*\)\.o:@\1.d \1.o:@' > $@