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 --- Makefile | 10 +- Makefile.in | 68 +++++++ configure | 10 +- diff/COPYING | 340 +++++++++++++++++++++++++++++++ diff/Makefile | 0 diff/Makefile.in | 118 +++++------ diff/configure | 91 +++++++++ diff/main.mk.in | 52 +++++ ptranslate/Makefile.in | 59 ------ ptranslate/main.mk.in | 44 ++++ ptranslate/translators-posix/Makefile.in | 37 ++-- rvs/Makefile.in | 129 ------------ rvs/main.mk.in | 69 +++++++ 13 files changed, 745 insertions(+), 282 deletions(-) create mode 100644 Makefile.in create mode 100644 diff/COPYING delete mode 100644 diff/Makefile create mode 100755 diff/configure create mode 100644 diff/main.mk.in delete mode 100644 ptranslate/Makefile.in create mode 100644 ptranslate/main.mk.in delete mode 100644 rvs/Makefile.in create mode 100644 rvs/main.mk.in diff --git a/Makefile b/Makefile index 3ab342a..497805e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,6 @@ name=thing # programs SHELL = /bin/sh -CP = cp RM = rm -f MKDIR = mkdir -p @@ -31,10 +30,9 @@ all : .SECONDARY: - - -%/COPYING : COPYING %/; $(CP) $< $@ -%/configure : configure %/; $(CP) $< $@ +%/COPYING : COPYING %/; cp $< $@ +%/configure : configure %/; cp $< $@ +%/Makefile.in : Makefile.in %/; cp $< $@ clean-mods = $(addprefix clean-,$(mods)) distclean-mods = $(addprefix distclean-,$(mods)) @@ -46,7 +44,7 @@ distclean-% : % %/ $(RM) $. + +# 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@ + +# Programs ########################################################### +SHELL = /bin/sh +CC = gcc +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) +INSTALL_DATA = $(INSTALL) -m 644 +MKDIR = $(INSTALL) -d #mkdir -p +RM = rm -f +SED = sed + +include main.mk + +# dist ############################################################### +d = $(name)-$(ver) +.PHONY : dist +dist : $(d).tar.gz + +$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist)) + tar -czf $@ $< + +$(d) : + $(INSTALL) -m 777 -d $@ + +$(d)/% : $(srcdir)/% $(d) + cp $< $@ + +# implicit rules ##################################################### +$(dirs) : + $(MKDIR) $@ + +% : %.sh + $(SED) 's/@VER@/$(ver)/g' < $< > $@ + +$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $< $@ + +Makefile : $(srcdir)/configure + $< + diff --git a/configure b/configure index 87fe228..0e10974 100755 --- a/configure +++ b/configure @@ -75,12 +75,12 @@ for var in $vars; do echo "s:@$var@:$val:g" >> var.sed done -echo "11 a# DO NOT edit this file, it has been generated by configure, and will -11 a# be overwritten. Instead, edit the file \`Makefile.in'" >> var.sed - -Makefiles=`find "${_srcdir}/" -regextype posix-extended \ --regex '(.*/)?Makefile\.in' -type f` +echo " +19 a# DO NOT edit this file, it has been generated by configure, and will +19 a# be overwritten. Instead, edit the file \`Makefile.in'" >> var.sed +Makefiles="`find "${_srcdir}/" -type f -name Makefile.in`" +Makefiles="$Makefiles `find "${_srcdir}/" -type f -name *.mk.in`" for orig in $Makefiles; do new=${orig/%.in/} new=${new/#$_srcdir\//} diff --git a/diff/COPYING b/diff/COPYING new file mode 100644 index 0000000..d60c31a --- /dev/null +++ b/diff/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/diff/Makefile b/diff/Makefile deleted file mode 100644 index e69de29..0000000 diff --git a/diff/Makefile.in b/diff/Makefile.in index ebd5f5f..c8af005 100644 --- a/diff/Makefile.in +++ b/diff/Makefile.in @@ -1,78 +1,50 @@ #!/usr/bin/make -f -name = diff-daemon -ver = 1.0 +#name = Luke's Makefile +#ver = 1.0 # Copyright (C) 2009 Luke Shumaker # -# This file is part of diff-daemon. +# 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. # -# diff-daemon 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, or (at your option) any later version. -# -# diff-daemon 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. +# 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 diff-daemon; see the file COPYING. -# If not, write to the Free Software Foundation, -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -# Directories ###################################################### -srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -sbindir = @sbindir@ -dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) - -# Programs ######################################################### -SHELL = @SHELL@ -RM = rm -f -SED = sed -INSTALL = install -MKDIR = $(INSTALL) -d #mkdir -p -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 - -# phony targets #################################################### -all : diff-daemon patch-daemon -.PHONY : install uninstall clean distclean dist -.SUFFIXES : - -# install ########################################################## - -install : install-diff-daemon install-patch-daemon - -install-diff-daemon : diff-daemon - $(INSTALL_PROGRAM) $< $(bindir)/$< -install-patch-daemon : patch-daemon - $(INSTALL_PROGRAM) $< $(bindir)/$< - -# uninstall ######################################################## - -uninstall : uninstall-diff-daemon uninstall-patch-daemon - -uninstall-diff-daemon : - $(rm) $(bindir)/diff-daemon -uninstall-patch-daemon : - $(rm) $(bindir)/patch-daemon - -# clean ############################################################ - -clean : - -distclean : clean - $(RM) Makefile - $(RM) diff-daemon patch-daemon - -# dist ############################################################# - +# along with this program; see the file COPYING. +# If not, see . + +# 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@ + +# Programs ########################################################### +SHELL = /bin/sh +CC = gcc +INSTALL = install +INSTALL_PROGRAM = $(INSTALL) +INSTALL_DATA = $(INSTALL) -m 644 +MKDIR = $(INSTALL) -d #mkdir -p +RM = rm -f +SED = sed + +include main.mk + +# dist ############################################################### d = $(name)-$(ver) +.PHONY : dist dist : $(d).tar.gz -$(d).tar.gz : $(d) $(d)/COPYING $(d)/configure $(d)/diff-daemon.sh $(d)/patch-daemon.sh $(d)/Makefile.in +$(d).tar.gz : $(d) $(addprefix $(d)/,$(filelist)) tar -czf $@ $< $(d) : @@ -81,10 +53,16 @@ $(d) : $(d)/% : $(srcdir)/% $(d) cp $< $@ -# implicit rules ################################################### - +# implicit rules ##################################################### $(dirs) : $(MKDIR) $@ -% : $(srcdir)/%.sh - sed 's/$bSHELL@/$(subst /,\/,$(SHELL))/g' < $< > $@ + +% : %.sh + $(SED) 's/@VER@/$(ver)/g' < $< > $@ + +$(DESTDIR)$(bindir)/% : % $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) $< $@ + +Makefile : $(srcdir)/configure + $< diff --git a/diff/configure b/diff/configure new file mode 100755 index 0000000..0e10974 --- /dev/null +++ b/diff/configure @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +name='configure' # Luke's configureation script +#version='1.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 . + + _prefix='/usr/local' +_exec_prefix='$(prefix)' + _bindir='$(exec_prefix)/bin' + _sbindir='$(exec_prefix)/sbin' + _libexecdir='$(exec_prefix)/libexec' + _srcdir=$(readlink -f `dirname "$0"`) +vars='prefix exec_prefix bindir sbindir libexecdir srcdir' +if [ -f "$_srcdir/config" ]; then . "$_srcdir/config"; fi + +error() { + echo "$name: $1" >> /dev/stderr + exit 1 +} + +args=`getopt -n "$name" -o "${sopt}" -l "${lopt}${vars}" -- "$@"` +if [ $? == 0 ]; then + set -- $args + while [ $# -gt 0 ]; do case "$1" in + --) break;; + --*) + var0="${1/--/}" + match='false' + for var1 in $vars; do + if [ "$var0" == "$var1" ]; then + match='true' + break; + fi + done + if [ "$match" == 'true' ]; then + val="$2" + eval _$var0=$val + else + error "option \`$1' not recognized"; + fi + :;; + *) error "option \`$1' not recognized";; + esac + shift + done +else + error 'unable to parse command line arguments' +fi + +echo '#!/bin/sed -f' > var.sed +for var in $vars; do + var1="_$var" + val=${!var1} + + # GNU bash optimized version + var=${var//':'/'\:'} + val=${val//':'/'\:'} + # POSIX version + #var=`echo "$var" | sed 's@:@\\:@g'` + #val=`echo "$val" | sed 's@:@\\:@g'` + + echo "s:@$var@:$val:g" >> var.sed +done + +echo " +19 a# DO NOT edit this file, it has been generated by configure, and will +19 a# be overwritten. Instead, edit the file \`Makefile.in'" >> var.sed + +Makefiles="`find "${_srcdir}/" -type f -name Makefile.in`" +Makefiles="$Makefiles `find "${_srcdir}/" -type f -name *.mk.in`" +for orig in $Makefiles; do + new=${orig/%.in/} + new=${new/#$_srcdir\//} + mkdir -p `dirname "$new"` + sed -f var.sed < "${orig}" > "${new}" +done +rm var.sed + diff --git a/diff/main.mk.in b/diff/main.mk.in new file mode 100644 index 0000000..99a71c2 --- /dev/null +++ b/diff/main.mk.in @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +name = diff-daemon +ver = 1.1 +# 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 . + +src = /var/srcdir +# general stuffs ##################################################### +all : diff-daemon patch-daemon +.SUFFIXES : +VPATH = $(srcdir) +filelist = \ + COPYING \ + configure \ + Makefile.in \ + diff-daemon.sh \ + patch-daemon.sh + +# (un)install ######################################################## +.PHONY : install uninstall +install : all install-diff-daemon install-patch-daemon +uninstall : uninstall-diff-daemon uninstall-patch-daemon + +.PHONY : install-diff-daemon install-patch-daemon \ + uninstall-diff-daemon uninstall-patch-daemon +install-diff-daemon : diff-daemon $(DESTDIR)$(bindir)/diff-daemon +uninstall-diff-daemon : ; $(RM) $(DESTDIR)$(bindir)/diff-daemon +install-patch-daemon : patch-daemon $(DESTDIR)$(bindir)/patch-daemon +uninstall-patch-daemon : ; $(RM) $(DESTDIR)$(bindir)/patch-daemon + +# clean ############################################################## +.PHONY : clean +clean : + +.PHONY : distclean +distclean : clean + $(RM) Makefile + $(RM) diff-daemon patch-daemon + 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 diff --git a/rvs/Makefile.in b/rvs/Makefile.in deleted file mode 100644 index 362a73a..0000000 --- a/rvs/Makefile.in +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/make -f -name = @name@ -ver = 0.8r58 -# Copyright (C) 2009 Luke Shumaker -# -# This file is part of rvs. -# -# rvs 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, or (at your option) any later version. -# -# rvs 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 rvs; see the file COPYING. -# If not, write to the Free Software Foundation, -# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -export rvs = $(name) -# directories ###################################################### -srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -dirs = $(srcdir) $(prefix) $(exec_prefix) $(bindir) $(sbindir) $(libexecdir) -export srcdir prefix exec_prefix bindir sbindir libexecdir - -# programs ######################################################### -SHELL = /bin/sh -CC = gcc -RVS = @RVS@ -RM = rm -f -CP = cp -SED = sed -INSTALL = install -MKDIR = $(INSTALL) -d #mkdir -p -INSTALL_PROGRAM = $(INSTALL) -INSTALL_DATA = $(INSTALL) -m 644 -TOUCH = touch -export RVS SHELL RM CP SED INSTALL MKDIR INSTALL_PROGRAM INSTALL_DATA TOUCH - -# plugins ########################################################## -plugins = $(patsubst $(srcdir)/plugins/%,%, \ - $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d)) - -build-plugins = $(addprefix p-,$(plugins)) -install-plugins = $(addprefix install-p-,$(plugins)) -uninstall-plugins = $(addprefix uninstall-p-,$(plugins)) -clean-plugins = $(addprefix clean-p-,$(plugins)) -distclean-plugins = $(addprefix distclean-p-,$(plugins)) -dist-plugins = $(addprefix dist-p-,$(plugins)) - -# phony targets #################################################### -all : wrapper $(build-plugins) -.PHONY : install uninstall clean distclean dist libexec \ - build-wrapper install-wrapper uninstall-wrapper clean-wrapper distclean-wrapper dist-wrapper -#$(build-plugins) $(install-plugins) $(uninstall-plugins) $(clean-plugins) $(distclean-plugins) $(dist-plugins) - -.SUFFIXES : - -Makefile : $(srcdir)/configure - $< - -# install ########################################################## - -install : install-wrapper libexec $(install-plugins) - -# $(libexecdir)/rvs/* -libexec : $(libexecdir)/$(rvs)/plugins -$(libexecdir)/$(rvs)/plugins : $(libexecdir)/$(rvs) - $(TOUCH) $@ - -# uninstall ######################################################## - -uninstall : - $(RM) $(bindir)/$(rvs) - $(RM) -r $(libexecdir)/$(rvs) - -# clean ############################################################ - -clean : $(clean-plugins) clean-wrapper - -distclean : clean $(distclean-plugins) distclean-wrapper - $(RM) Makefile - -# dist ############################################################# - -d = $(name)-$(ver) -dist : $(d).tar.gz - -$(d).tar.gz : $(d) - tar -czf $@ $< - -$(d) : distclean - $(INSTALL) -m 777 -d $@ - $(CP) -r $(srcdir)/* $@ - -# wrapper ########################################################## - -wrapper : build-wrapper -build-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< -uninstall-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< uninstall -clean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< clean -distclean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< distclean -dist-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< dist - -install-wrapper : wrapper/ wrapper/Makefile wrapper; $(MAKE) -C $< install -$(RVS) : install-wrapper - -# plugins ########################################################## - -install-p-% : plugins/% plugins/%/Makefile p-% libexec $(RVS) - $(MAKE) -C $< install -p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< -uninstall-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< uninstall -clean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< clean -distclean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< distclean -dist-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< dist - -# implicit rules ################################################### - -$(dirs) $(libexecdir)/$(rvs) : - $(MKDIR) $@ - diff --git a/rvs/main.mk.in b/rvs/main.mk.in new file mode 100644 index 0000000..622607f --- /dev/null +++ b/rvs/main.mk.in @@ -0,0 +1,69 @@ +#!/usr/bin/make -f +name = @name@ +ver = 0.8r58 + +rvs = $(name) +RVS = @RVS@ +# plugins ########################################################## +plugins = $(patsubst $(srcdir)/plugins/%,%, \ + $(shell find $(srcdir)/plugins/* -maxdepth 0 -type d)) + +build-plugins = $(addprefix p-,$(plugins)) +install-plugins = $(addprefix install-p-,$(plugins)) +uninstall-plugins = $(addprefix uninstall-p-,$(plugins)) +clean-plugins = $(addprefix clean-p-,$(plugins)) +distclean-plugins = $(addprefix distclean-p-,$(plugins)) +dist-plugins = $(addprefix dist-p-,$(plugins)) + +# phony targets #################################################### +all : wrapper $(build-plugins) +.PHONY : install uninstall clean distclean dist libexec \ + build-wrapper install-wrapper uninstall-wrapper clean-wrapper distclean-wrapper dist-wrapper +#$(build-plugins) $(install-plugins) $(uninstall-plugins) $(clean-plugins) $(distclean-plugins) $(dist-plugins) + +.SUFFIXES : + +# install ########################################################## + +install : install-wrapper libexec $(install-plugins) + +# $(libexecdir)/rvs/* +libexec : $(libexecdir)/$(rvs)/plugins +$(libexecdir)/$(rvs)/plugins : $(libexecdir)/$(rvs) + $(TOUCH) $@ + +# uninstall ######################################################## + +uninstall : + $(RM) $(bindir)/$(rvs) + $(RM) -r $(libexecdir)/$(rvs) + +# clean ############################################################ + +clean : $(clean-plugins) clean-wrapper + +distclean : clean $(distclean-plugins) distclean-wrapper + $(RM) Makefile + +# wrapper ########################################################## + +wrapper : build-wrapper +build-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< +uninstall-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< uninstall +clean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< clean +distclean-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< distclean +dist-wrapper : wrapper/ wrapper/Makefile; $(MAKE) -C $< dist + +install-wrapper : wrapper/ wrapper/Makefile wrapper; $(MAKE) -C $< install +$(RVS) : install-wrapper + +# plugins ########################################################## + +install-p-% : plugins/% plugins/%/Makefile p-% libexec $(RVS) + $(MAKE) -C $< install +p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< +uninstall-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< uninstall +clean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< clean +distclean-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< distclean +dist-p-% : plugins/% plugins/%/Makefile ; $(MAKE) -C $< dist + -- cgit v1.2.3-54-g00ecf