From 293baaf7cca32bf6f94412a039ca204f5ac0734f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 25 Oct 2009 04:05:40 -0400 Subject: major rewrite on build system, make doesn't complain for diff --- ptranslate/Makefile.in | 59 -------------------------------- ptranslate/main.mk.in | 44 ++++++++++++++++++++++++ ptranslate/translators-posix/Makefile.in | 37 +++++++++++++------- 3 files changed, 68 insertions(+), 72 deletions(-) delete mode 100644 ptranslate/Makefile.in create mode 100644 ptranslate/main.mk.in (limited to 'ptranslate') diff --git a/ptranslate/Makefile.in b/ptranslate/Makefile.in deleted file mode 100644 index f4bbbda..0000000 --- a/ptranslate/Makefile.in +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/make -f -name = ptranslate -ver = 1.9.0 -# Copyright (C) 2009 Luke Shumaker -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; see the file COPYING. -# If not, see . - -DESTDIR = @DESTDIR@ -srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ - -trans_srcdir = @trans@ - -INSTALL = install -MKDIR = $(INSTALL) -d #mkdir -p -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 -RM = rm -f -SED = sed - -all : translators ptranslate -install : install-translators $(DESTDIR)$(bindir)/ptranslate -.PHONY : translators -.SUFFIXES : -VPATH = $(srcdir) - -translators : ; $(MAKE) -C $(trans_srcdir) -install-translators : ; $(MAKE) -C $(trans_srcdir) install -remove-translators : ; $(MAKE) -C $(trans_srcdir) remove - -% : %.sh - $(INSTALL_PROGRAM) $< $@ - $(SED) -i 's/@VER@/$ver/g' $@ - -$(DESTDIR)$(bindir)/% : % - $(INSTALL_PROGRAM) $< $@ - -Makefile : $(srcdir)/configure - $< - -remove: remove-translators - $(RM) $(bindir)/ptranslate - diff --git a/ptranslate/main.mk.in b/ptranslate/main.mk.in new file mode 100644 index 0000000..67655cc --- /dev/null +++ b/ptranslate/main.mk.in @@ -0,0 +1,44 @@ +#!/usr/bin/make -f +name = ptranslate +ver = 1.9.0 +# Copyright (C) 2009 Luke Shumaker +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see . + +trans = @trans@ +all : translators ptranslate +install : install-translators $(DESTDIR)$(bindir)/ptranslate +.SUFFIXES : +VPATH = $(srcdir) +filelist = \ + COPYING \ + configure \ + Makefile.in \ + ptranslate.sh \ + translators-hurd \ + translators-posix \ + translators-posix/Makefile.in \ + translators-posix/x-bzip2.sh \ + translators-posix/x-gzip.sh \ + translators-posix/x-tar.sh + +.PHONY : translators install-translators remove-translators +translators : ; $(MAKE) -C $(trans) +install-translators : ; $(MAKE) -C $(trans) install +remove-translators : ; $(MAKE) -C $(trans) remove + +remove: remove-translators + $(RM) $(bindir)/ptranslate + diff --git a/ptranslate/translators-posix/Makefile.in b/ptranslate/translators-posix/Makefile.in index d6f8fa1..f897178 100644 --- a/ptranslate/translators-posix/Makefile.in +++ b/ptranslate/translators-posix/Makefile.in @@ -17,20 +17,24 @@ # along with this program; see the file COPYING. # If not, see . -DESTDIR = @DESTDIR@ -srcdir ?= @srcdir@ +# Directories ######################################################## +DESTDIR = @DESTDIR@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +dirs = $(DESTDIR) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir) +srcdir = @srcdir@ mysrcdir = $(srcdir)/translators-posix -prefix ?= @prefix@ -exec_prefix ?= @exec_prefix@ -bindir ?= @bindir@ -sbindir ?= @sbindir@ -libexecdir ?= @libexecdir@ -INSTALL ?= install -MKDIR ?= $(INSTALL) -d #mkdir -p -INSTALL_PROGRAM ?= $(INSTALL) -INSTALL_DATA ?= $(INSTALL) -m 644 -RM ?= rm -f +# Programs ########################################################### +SHELL = /bin/sh +INSTALL = install +MKDIR = $(INSTALL) -d #mkdir -p +INSTALL_PROGRAM = $(INSTALL) +INSTALL_DATA = $(INSTALL) -m 644 +RM = rm -f all : x-bzip2 x-gzip x-tar install : mime install-x-bzip2 install-x-gzip install-x-tar @@ -64,10 +68,17 @@ $(DESTDIR)$(libexecdir)/media-types/multipart/% : % mime; $(INSTALL_PROGRAM) $ $(DESTDIR)$(libexecdir)/media-types/text/% : % mime; $(INSTALL_PROGRAM) $< $@ $(DESTDIR)$(libexecdir)/media-types/video/% : % mime; $(INSTALL_PROGRAM) $< $@ -remove : +uninstall : $(RM) -r $(DESTDIR)$(libexecdir)/media-types +# implicit rules ##################################################### +$(dirs) : + $(MKDIR) $@ + % : %.sh + $(SED) 's/@VER@/$ver/g' < $< > $@ + +$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) $< $@ Makefile : $(srcdir)/configure -- cgit v1.2.3-2-g168b