From b9249ba428bd1c9aae05c3777a84697fe50e0f36 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 1 Aug 2013 02:46:52 +0200 Subject: add .phony MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Makefile b/Makefile index 145bb6e..33f4b68 100644 --- a/Makefile +++ b/Makefile @@ -28,10 +28,13 @@ JAVAC = javac +.PHONY: all all: python bash java c doc +.PHONY: doc doc: info +.PHONY: info info: argparser.info.gz %.info.gz: info/%.texinfo @@ -39,16 +42,19 @@ info: argparser.info.gz gzip -9 -f "$*.info" +.PHONY: python python: bin/argparser.py bin/argparser.py: src/argparser.py cp "$<" "$@" sed -i 's:^#!/usr/bin/env python3$$:#!$(PY3SHEBANG)":' "$@" +.PHONY: bash bash: bin/argparser.bash bin/argparser.bash: src/argparser.bash cp "$<" "$@" sed -i 's:^#!/bin/bash$$:#!$(BASHSHEBANG)":' "$@" +.PHONY: java java: bin/ArgParser.jar bin/ArgParser.jar: src/argparser/ArgParser.java @mkdir -p bin @@ -56,6 +62,7 @@ bin/ArgParser.jar: src/argparser/ArgParser.java $(JAVAC) $(JAVA_OPTIMISE) -cp src -s src -d bin src/Test.java cd bin ; jar cf ArgParser.jar argparser/ArgParser*.class +.PHONY: c c: bin/argparser.so bin/argparser.so: src/argparser.c src/argparser.h @mkdir -p bin @@ -65,61 +72,78 @@ bin/argparser.so: src/argparser.c src/argparser.h +.PHONY: install install: install-python install-bash install-java install-c install-license install-doc +.PHONY: install-python install-python: bin/argparser.py install -Dm644 bin/argparser.py "$(DESTDIR)$(LIBPY3)/argparser.py" +.PHONY: install-bash install-bash: bin/argparser.bash install -Dm644 bin/argparser.bash "$(DESTDIR)$(LIBBASH)/argparser.bash" +.PHONY: install-java install-java: bin/ArgParser.jar install -Dm644 bin/ArgParser.jar "$(DESTDIR)$(LIBJAVA)/ArgParser.jar" +.PHONY: install-c install-c: bin/argparser.so src/argparser.h install -Dm644 bin/argparser.so "$(DESTDIR)$(LIBC)/libargparser.so.$(VERSION)" ln -s "libargparser.so.$(VERSION)" "$(DESTDIR)$(LIBC)/libargparser.so" install -Dm644 src/argparser.h "$(DESTDIR)$(PREFIX)$(INCLUDE)/argparser.h" +.PHONY: install-license install-license: install -d "$(DESTDIR)$(LICENSES)/$(PKGNAME)" install -m644 COPYING LICENSE "$(DESTDIR)$(LICENSES)/$(PKGNAME)" +.PHONY: install-doc install-doc: install-info +.PHONY: install-info install-info: argparser.info.gz install -Dm644 argparser.info.gz "$(DESTDIR)$(PREFIX)$(SHARE)/info/$(PKGNAME).info.gz" +.PHONY: uninstall uninstall: uninstall-python uninstall-bash uninstall-java uninstall-c uninstall-license uninstall-doc +.PHONY: uninstall-python uninstall-python: rm -- "$(DESTDIR)$(LIBPY3)/argparser.py" +.PHONY: uninstall-bash uninstall-bash: rm -- "$(DESTDIR)$(LIBBASH)/argparser.bash" +.PHONY: uninstall-java uninstall-java: rm -- "$(DESTDIR)$(LIBJAVA)/ArgParser.jar" +.PHONY: uninstall-c uninstall-c: rm -- "$(DESTDIR)$(LIBC)/libargparser.so" rm -- "$(DESTDIR)$(LIBC)/libargparser.so.1.0" rm -- "$(DESTDIR)$(PREFIX)$(INCLUDE)/argparser.h" +.PHONY: uninstall-license uninstall-license: rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/LICENSE" rm -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)/COPYING" -rmdir -- "$(DESTDIR)$(LICENSES)/$(PKGNAME)" +.PHONY: uninstall-doc uninstall-doc: uninstall-info +.PHONY: uninstall-info uninstall-info: rm -- "$(DESTDIR)$(PREFIX)$(SHARE)/info/$(PKGNAME).info.gz" +.PHONY: clean clean: -rm -r -- bin -- cgit v1.2.3-70-g09d2