1 # $Id: Makefile.in,v 1.3 2004/08/23 02:58:58 jlam Exp $
7 PACKAGE_NAME= @PACKAGE_NAME@
8 PACKAGE_VERSION= @PACKAGE_VERSION@
13 exec_prefix = @exec_prefix@
20 AUTOHEADER = @AUTOHEADER@
21 mkinstalldirs = $(SHELL) $(srcdir)/mkinstalldirs
22 install_sh = $(SHELL) $(srcdir)/install-sh
25 INSTALL_PROGRAM = @INSTALL_PROGRAM@
26 INSTALL_DATA = @INSTALL_DATA@
27 INSTALL_SCRIPT = @INSTALL_SCRIPT@
28 INSTALL_HEADER = $(INSTALL_DATA)
29 transform = @program_transform_name@
30 host_alias = @host_alias@
32 CANONICAL_HOST = @CANONICAL_HOST@
38 DEFS= @DEFS@ -I. -I@srcdir@ -DHOST=\"$(CANONICAL_HOST)\" -DVERSION=\"$(PACKAGE_VERSION)\"
42 LINK= $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
43 COMPILE= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
45 SRCS= compile.c main.c misc.c process.c defs.h extern.h
46 OBJS = compile.o main.o misc.o process.o
48 DISTFILES= $(SRCS) AUTHORS COPYING INSTALL Makefile.in NEWS README aclocal.m4 \
49 config.guess config.h.in config.sub configure configure.ac install-sh \
50 missing mkinstalldirs regress.sh
53 $(COMPILE) -c $< -o $@
58 $(LINK) $(OBJS) $(LIBS)
61 @SHELL@ $(srcdir)/regress.sh
67 rm -f Makefile config.h
68 rm -f config.status config.cache config.log configure.lineno
70 maintainer-clean: distclean
71 rm -f configure config.h.in
74 $(mkinstalldirs) $(DESTDIR)$(bindir)
75 @f=`echo sed|sed '$(transform)'`; \
76 echo "$(INSTALL_PROGRAM) sed $(DESTDIR)$(bindir)/$$f"; \
77 $(INSTALL_PROGRAM) sed $(DESTDIR)$(bindir)/$$f
78 $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
79 @f=`echo sed.1|sed '$(transform)'`; \
80 echo "$(INSTALL_DATA) sed.1 $(DESTDIR)$(mandir)/man1/$$f"; \
81 $(INSTALL_DATA) sed.1 $(DESTDIR)$(mandir)/man1/$$f
82 $(mkinstalldirs) $(DESTDIR)$(mandir)/cat1
83 @f=`echo sed.cat1|sed '$(transform);s,\.cat1$$,.0,'`; \
84 echo "$(INSTALL_DATA) sed.cat1 $(DESTDIR)$(mandir)/cat1/$$f"; \
85 $(INSTALL_DATA) sed.cat1 $(DESTDIR)$(mandir)/cat1/$$f
88 @f=`echo sed|sed '$(transform)'`; \
89 echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
90 rm -f $(DESTDIR)$(bindir)/$$f
94 distdir= $(PACKAGE_NAME)-$(PACKAGE_VERSION)
97 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
99 @for file in $(DISTFILES); do \
100 if test -f $$file; then d=.; else d=$(srcdir); fi; \
101 dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
102 if test "$$dir" != "$$file" && test "$$dir" != "."; then \
103 $(mkinstalldirs) "$(distdir)/$$dir"; \
105 if test -d $$d/$$file; then \
106 cp -pR $$d/$$file $(distdir) \
109 test -f $(distdir)/$$file \
110 || cp -p $$d/$$file $(distdir)/$$file \
114 -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
115 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
116 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
117 ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
118 || chmod -R a+r $(distdir)
121 $(TAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
122 -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
125 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
126 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(TAR) xf -
127 chmod -R a-w $(distdir); chmod a+w $(distdir)
128 mkdir $(distdir)/=build
129 mkdir $(distdir)/=inst
131 dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
132 && cd $(distdir)/=build \
133 && ../configure --srcdir=.. --prefix=$$dc_install_base \
137 && $(MAKE) uninstall \
138 && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
139 || (echo "Error: files left after uninstall" 1>&2; \
142 && $(MAKE) distclean \
143 && rm -f $(distdir).tar.gz \
144 && (test `find . -type f -print | wc -l` -eq 0 \
145 || (echo "Error: files left after distclean" 1>&2; \
147 -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
148 @echo "$(distdir).tar.gz is ready for distribution" | \
149 sed 'h;s/./=/g;p;x;p;x'