chiark / gitweb /
Bugfixing ...
[userv.git] / Makefile.in
index c6d66b90d3bb6d9b127bca5204293f749b2e6d27..473e2fbcab8564aa060a5410539d8cdc08caf936 100644 (file)
@@ -31,7 +31,7 @@ LEX=flex
 CWD=$(shell pwd)
 
 INSTALL_GROUP=root
-INSTALL_FLAGS=-u root -g $(INSTALL_GROUP)
+INSTALL_FLAGS=-o root -g $(INSTALL_GROUP)
 
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@ $(INSTALL_FLAGS)
@@ -46,7 +46,7 @@ docdir=$(prefix)/userv
 
 TARGETS=       daemon client
 TARGETS_DOC_PS=        spec.ps overview.ps
-TARGETS_DOC=   spec.html $(TARGETS_DOC_PS)
+TARGETS_DOC=   spec.html/index.html $(TARGETS_DOC_PS)
 
 SOURCES=       Makefile.in configure.in acconfig.h                     \
                client.c common.h                                       \
@@ -54,16 +54,9 @@ SOURCES=     Makefile.in configure.in acconfig.h                     \
                daemon.h debug.c parser.c lib.c lib.h                   \
                language.i4 lexer.l.m4 tokens.h.m4
 
-ALSOSHIP=      README INSTALL Changelog COPYING \
-               system.default system.override \
-               spec.sgml.in overview.fig overview.ps \
-               buildship install-sh .cvsignore
-
-GENSHIP_CLEAN= pcsum.h lexer.l lexer.c tokens.h config.h.in spec.sgml $(TARGETS_DOC)
+GENSHIP_CLEAN= lexer.l lexer.c tokens.h config.h.in spec.sgml $(TARGETS_DOC)
 GENSHIP=       $(GENSHIP_CLEAN) configure
 
-SHIPTARGETS=   $(SOURCES) $(ALSOSHIP) $(GENSHIP)
-
 all:           $(TARGETS)
 
 docs:          $(TARGETS_DOC)
@@ -73,7 +66,7 @@ install:      all
                $(INSTALL_PROGRAM) -m 4755 client $(bindir)/userv
                $(INSTALL) -d -m 2755 $(etcsubdir) \
        $(etcsubdir)/default.d $(etcsubdir)/services.d $(etcsubdir)/override.d
-               if test ! -f $(etcsubdir)/system.default; then 
+               if test ! -f $(etcsubdir)/system.default; then \
                        $(INSTALL_DATA) system.default $(etcsubdir); fi
                if test ! -f $(etcsubdir)/system.override; then \
                        $(INSTALL_DATA) system.override $(etcsubdir); fi
@@ -130,11 +123,6 @@ version.h: Makefile
 
 tokens.h:      language.i4
 
-pcsum.h
-               rm -f overview.eps
-               rm -f spec.lout* spec.text* spec.sgml spec.sgml.new spec.ps?*
-               rm -rf spec.html?*
-               rm -f lout.li *.lix *.ldx config.cache
                rm -f *.o *~ core ./#*#
 
 autoconf configure:
@@ -142,23 +130,35 @@ autoconf configure:
                autoconf
 
 clean:
+               find -name '*.orig' -o -name '*~' -o -name '.*~' \
+                       -o -name '*#' -o -name '.#*' -o -name '*.bak' \
+                       | xargs -r rm
                rm -rf $(TARGETS) *.o
+               rm -f overview.eps
+               rm -f spec.lout* spec.text* spec.ps?* spec.sgml.new
+               rm -f lout.li *.ld *.lix *.ldx
+               rm -f userv-*.tar.gz vd/*
 
 distclean mostlyclean: clean
-               rm -f config.status config.log Makefile config.h
+               rm -f config.status config.log Makefile config.h config.cache pcsum.h
 
 maintainer-clean:      distclean
-               rm -rf $(GENSHIP_CLEAN)
-
-dist-prep:     $(SHIPTARGETS)
-
-dist:          $(SHIPTARGETS)
-               rm -rf shipcheck
-               mkdir -p shipcheck/userv-$(VERSION)
-               cp -a $^ shipcheck/userv-$(VERSION)
-               cd shipcheck && \
-                GZIP=-9v tar zvvcf userv-$(VERSION).tar.gz userv-$(VERSION)
-               rm -rf shipcheck/userv-$(VERSION)
+               rm -rf $(GENSHIP_CLEAN) spec.html/*.html
+
+dist-prep:     $(GENSHIP) distclean
+
+dist_tmp=dist_tmp/userv-$(VERSION)
+dist_prune=\( -name CVS -o -name 'dist_tmp*' -o -name slash-etc -o -name vd \)
+dist:                  dist-prep
+       rm -rf dist_tmp*
+       mkdir dist_tmp $(dist_tmp)
+       find $(dist_prune) -prune -o -type d -print | \
+               sed -e 's#.*#mkdir -p $(dist_tmp)/&#' | sh
+       find $(dist_prune) -prune -o -type f -print | \
+               sed -e 's#.*#ln & $(dist_tmp)/&#' | sh
+       cd dist_tmp && tar cf ../$(dist_tmp).tar `basename $(dist_tmp)`
+       gzip -9 $(dist_tmp).tar
+       mv $(dist_tmp).tar.gz .
 
 linecount:     $(SOURCES)
                wc -l $^