Makefile
author Daniel Kobras <kobras@debian.org>
Thu, 15 Dec 2005 15:40:14 +0100
changeset 1587 851bc33ff545
parent 1426 e84c69b43cdb
child 2207 8a2a7f7d9df6
permissions -rw-r--r--
Less annoying directory completion (see http://bugs.debian.org/343458) The current bash completion script is quite painful in conjuntion with deep directory trees because it adds a space after each successful directory completion. Eg. "hg clone /ho<tab>" is completed to "hg clone /home " when what you really want is "hg clone /home/" (assuming the complete path to the repository looks like /home/foo/hg...). That's because the 'complete' command does not know about the type of completion it receives from the _hg shell function. When only a single completion is returned, it assumes completion is complete and tells readline to add a trailing space. This behaviour is usually wanted, but not in the case of directory completion. I've attached a patch that circumvents this problem by only returning successful completions for directories that contain a .hg subdirectory. If no repositories are found, no completions are returned either, and bash falls back to ordinary (filename) completion. I find this behaviour a lot less annoying than the current one. Alternative: Use option nospace for the 'complete' command and let _hg itself take care of adding a trailing space where appropriate. That's a far more intrusive change, though.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     1
# This Makefile is only used by developers.
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     2
PYTHON=python
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     3
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     4
all:
1020
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
     5
	$(PYTHON) setup.py build_ext -i
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
     6
f1b052db3515 Add default make rule
mpm@selenic.com
parents: 1008
diff changeset
     7
install:
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     8
	@echo "Read the file README for install instructions."
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     9
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    10
clean:
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    11
	-$(PYTHON) setup.py clean --all # ignore errors of this command
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    12
	find . -name '*.py[co]' -exec rm -f '{}' ';'
1423
76239f0cb0dc Use $(MAKE) not make
levon@movementarian.org
parents: 1020
diff changeset
    13
	$(MAKE) -C doc clean
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    14
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    15
dist:	tests doc
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    16
	TAR_OPTIONS="--owner=root --group=root --mode=u+w,go-w,a+rX-s" $(PYTHON) setup.py sdist --force-manifest
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    17
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    18
tests:
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    19
	cd tests && ./run-tests
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    20
1426
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
    21
test-%:
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
    22
	cd tests && ./run-tests $@
e84c69b43cdb add a target for running only one test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 1423
diff changeset
    23
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    24
doc:
1423
76239f0cb0dc Use $(MAKE) not make
levon@movementarian.org
parents: 1020
diff changeset
    25
	$(MAKE) -C doc
1008
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    26
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    27
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    28
.PHONY: all clean dist tests doc
85272e96b96a Add Makefile for generating release tarballs.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    29