From 6c323bc1bb27a79f687f5f3f3ed6b105aad24caa Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Thu, 2 Aug 2012 23:25:54 +0200 Subject: [PATCH] Remove StepMake as a separate package Rationale: * there are no publicly-known current usage cases of StepMake outside LilyPond, * StepMake installation has been disabled for a decade, * generic templates (stepmake/stepmake) have been so heavily customized lately for our heavy documentation that they can no longer be qualifed as "generic", * only a few build scripts have remained in stepmake/bin, whereas most of them now live in scripts/build. This commit removes everything in stepmake/ except included makefiles; scripts that are still used are moved to config/ (Autoconf helpers) or scripts/build (build and install scripts). Remove config make target to avoid potential conflict with new config/ directory. For clarity, a merge of all stepmake templates, from stepmake/stepmake and make/ into stepmake/ (or similar), will be done in another commit. --- .gitignore | 1 - Documentation/GNUmakefile | 2 +- Documentation/misc/GNUmakefile | 2 +- GNUmakefile.in | 2 +- ROADMAP | 1 + stepmake/aclocal.m4 => aclocal.m4 | 0 autogen.sh | 11 - {stepmake/bin => config}/config.guess | 0 {stepmake/bin => config}/config.sub | 0 {stepmake/bin => config}/install-sh | 0 configure.in | 7 +- {stepmake/bin => scripts/build}/install.py | 0 .../bin => scripts/build}/make-version.py | 2 +- {stepmake/bin => scripts/build}/text2html.py | 2 +- stepmake/GNUmakefile | 31 --- stepmake/INSTALL.texi | 240 ------------------ stepmake/README | 19 -- stepmake/autogen.sh | 52 ---- stepmake/bin/GNUmakefile | 11 - stepmake/bin/fake-msgfmt.sh | 33 --- stepmake/bin/ntpwd.py | 29 --- stepmake/bin/stepmakeise.sh | 105 -------- stepmake/config.hh.in | 14 - stepmake/configure.in | 45 ---- stepmake/stepmake/GNUmakefile | 25 -- stepmake/stepmake/generic-targets.make | 16 +- stepmake/stepmake/generic-vars.make | 3 +- stepmake/stepmake/toplevel-targets.make | 10 - 28 files changed, 14 insertions(+), 649 deletions(-) rename stepmake/aclocal.m4 => aclocal.m4 (100%) rename {stepmake/bin => config}/config.guess (100%) rename {stepmake/bin => config}/config.sub (100%) rename {stepmake/bin => config}/install-sh (100%) rename {stepmake/bin => scripts/build}/install.py (100%) rename {stepmake/bin => scripts/build}/make-version.py (98%) rename {stepmake/bin => scripts/build}/text2html.py (98%) delete mode 100644 stepmake/GNUmakefile delete mode 100644 stepmake/INSTALL.texi delete mode 100644 stepmake/README delete mode 100755 stepmake/autogen.sh delete mode 100644 stepmake/bin/GNUmakefile delete mode 100644 stepmake/bin/fake-msgfmt.sh delete mode 100644 stepmake/bin/ntpwd.py delete mode 100755 stepmake/bin/stepmakeise.sh delete mode 100644 stepmake/config.hh.in delete mode 100644 stepmake/configure.in delete mode 100644 stepmake/stepmake/GNUmakefile diff --git a/.gitignore b/.gitignore index 4ee4e5154a..3097acfe26 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,6 @@ TAGS \#* \#.* a.out -aclocal.m4 autom4te.cache config-*.hh config-*.make diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile index ab788379a8..fff37aa6ad 100644 --- a/Documentation/GNUmakefile +++ b/Documentation/GNUmakefile @@ -199,7 +199,7 @@ $(OUT_TXT_FILES): $(outdir)/%.txt: $(top-src-dir)/% cp -f $< $@ $(OUT_TXT_FILES:%.txt=%.html): $(outdir)/%.html: $(outdir)/%.txt - $(PYTHON) $(step-bindir)/text2html.py $< + $(buildscript-dir)/text2html $< # Explicitly list the dependencies on generated content $(outdir)/web.texi: $(outdir)/we-wrote.itexi $(outdir)/others-did.itexi $(outdir)/weblinks.itexi diff --git a/Documentation/misc/GNUmakefile b/Documentation/misc/GNUmakefile index 00fe5ae826..efc4dd9e69 100644 --- a/Documentation/misc/GNUmakefile +++ b/Documentation/misc/GNUmakefile @@ -22,5 +22,5 @@ $(outdir)/%.txt: % cp $< $@ txt-to-html: - $(PYTHON) $(step-bindir)/text2html.py $(OUT_TXT_FILES) + $(buildscript-dir)/text2html $(OUT_TXT_FILES) $(footify) $(addprefix $(outdir)/, $(addsuffix .html, $(TEXTS))) diff --git a/GNUmakefile.in b/GNUmakefile.in index 6f0e4f4a7b..9347dcb9a8 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -9,7 +9,7 @@ SUBDIRS = python scripts \ po \ elisp vim \ input \ - stepmake $(documentation-dir) + $(documentation-dir) ## this convoluted construction is necessary, since we don't know the diff --git a/ROADMAP b/ROADMAP index 99ad6b7fb6..2616c11c16 100644 --- a/ROADMAP +++ b/ROADMAP @@ -78,6 +78,7 @@ LilyPond's source files. | | SCRIPTS: | +|-- config/ Autoconf helpers for configure script |-- python/ Python modules, MIDI module | `-- auxiliar/ Python modules for build/maintenance |-- scripts/ End-user scripts (--> lilypond/usr/bin/) diff --git a/stepmake/aclocal.m4 b/aclocal.m4 similarity index 100% rename from stepmake/aclocal.m4 rename to aclocal.m4 diff --git a/autogen.sh b/autogen.sh index 34c022e082..9d21f79936 100755 --- a/autogen.sh +++ b/autogen.sh @@ -7,17 +7,6 @@ case $1 in --noconf*) NOCONFIGURE=true;; esac -if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then - echo "stepmake/aclocal.m4 is newer. Copying file." - cp -f stepmake/aclocal.m4 aclocal.m4 -fi - -if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then - echo "stepmake/autogen.sh is newer. Copying file." - cp -f stepmake/autogen.sh autogen.sh - exec ./autogen.sh "$@" -fi - for i in $srcdir/configure.in #`find $srcdir -name configure.in -print` do dir=`dirname $i` diff --git a/stepmake/bin/config.guess b/config/config.guess similarity index 100% rename from stepmake/bin/config.guess rename to config/config.guess diff --git a/stepmake/bin/config.sub b/config/config.sub similarity index 100% rename from stepmake/bin/config.sub rename to config/config.sub diff --git a/stepmake/bin/install-sh b/config/install-sh similarity index 100% rename from stepmake/bin/install-sh rename to config/install-sh diff --git a/configure.in b/configure.in index 66799abd3b..3a9eec9628 100644 --- a/configure.in +++ b/configure.in @@ -7,12 +7,7 @@ AC_PREREQ(2.60) AC_INIT # Bootstrap StepMake configure -# For user package: -AC_CONFIG_AUX_DIR([stepmake/bin]) - -# For stepmake package: -# AC_CONFIG_AUX_DIR(bin) - +AC_CONFIG_AUX_DIR([config]) STEPMAKE_INIT diff --git a/stepmake/bin/install.py b/scripts/build/install.py similarity index 100% rename from stepmake/bin/install.py rename to scripts/build/install.py diff --git a/stepmake/bin/make-version.py b/scripts/build/make-version.py similarity index 98% rename from stepmake/bin/make-version.py rename to scripts/build/make-version.py index 61247fb8aa..4b6a0aa56e 100644 --- a/stepmake/bin/make-version.py +++ b/scripts/build/make-version.py @@ -1,4 +1,4 @@ - +#!@PYTHON@ import re import sys diff --git a/stepmake/bin/text2html.py b/scripts/build/text2html.py similarity index 98% rename from stepmake/bin/text2html.py rename to scripts/build/text2html.py index 51f3948ef4..2456202778 100644 --- a/stepmake/bin/text2html.py +++ b/scripts/build/text2html.py @@ -1,4 +1,4 @@ -#@PYTHON@ +#!@PYTHON@ import os import re import string diff --git a/stepmake/GNUmakefile b/stepmake/GNUmakefile deleted file mode 100644 index 8a3eb0159a..0000000000 --- a/stepmake/GNUmakefile +++ /dev/null @@ -1,31 +0,0 @@ -# -*-Makefile-*- -# title specific top level makefile for StepMake - -# subdir level: -# -depth = .. - -# descent order into subdirectories: -# -SUBDIRS = bin stepmake - -# list of distribution files: -# -SCRIPTS = aclocal.m4 autogen.sh -README_FILES = README -README_TXT_FILES = -EXTRA_DIST_FILES = $(README_FILES) $(SCRIPTS) -NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES) -# - -# bootstrap stepmake: -# -STEPMAKE_TEMPLATES= texinfo -include $(depth)/make/stepmake.make - -# don't install stepmake -install: local-install - @echo Not installing stepmake - -localclean: - rm -f bin/*.pyc diff --git a/stepmake/INSTALL.texi b/stepmake/INSTALL.texi deleted file mode 100644 index bfc62cf766..0000000000 --- a/stepmake/INSTALL.texi +++ /dev/null @@ -1,240 +0,0 @@ -\input texinfo @c -*-texinfo-*- -@setfilename INSTALL.info -@settitle INSTALL - -@node Top, , , (dir) -@top - - -@unnumberedsec Name - - -INSTALL - installing StepMake - -@unnumberedsec Description - - -This page documents installation and usage of StepMake - -@unnumberedsec Abstract - - -StepMake is a drop-in package that takes care of generic Makefile and -packaging/distribution issues. It enables you to write only the simplest of -Makefile snippets, while providing a series powerful make targets. Features -include speed, wildcarding, out/ dir build, stateless Makefiles and package -clustering. It includes some handy scripts for making (package-)diffs and -patches, making binary distributions etc. - -To use StepMake with your package, you do something remotely like: -@example - - tar xzf releases/stepmake-0.1.23 - cd package-x.x.x/ # package to be StepMake-ised - ./../stepmake-0.1.23/bin/stepmakeise.sh - -@end example - -You'll have to customize at least the files: -@example - - ./VERSION . - ./configure.in - -@end example - -to your package's needs. You might want to take a look at: -@example - - ./make/Toplevel.make.in - ./config.hh.in - ./config.make.in - -@end example - -Also, you should put a Makefile in every subdirectory of your -package. These makefiles generally are quite simple, e.g. this -is a the makefile for an include directory of LilyPond: -@example - - # lily/include/Makefile - - depth = ../.. - include $(depth)/make/Stepmake.make - -@end example - -it will identify all @code{.h, .hh, ...} files and take care of distributing -them. - -There's a @file{make/Template.make} that you can use as an example. -See also the Makefiles in the LilyPond or Yodl package. - -Once included in your package, StepMake (or in fact, any -StepMake-ised package) behaves as a normal subdirectory; -make commands such as 'make dist' recurse into the stepmake tree -(For a list of available targets, type @code{make help} after -configuring). -Stepmake (and any changes made) will be distributed with the main -pacakage. However, StepMake doesn't lose its independency, change -to the stepmake directory, and it'll behave as a main package. -You shouldn't version directory names of subpackages, otherwise -you'll see that package twice in each patch when you upgrade. - -@unnumberedsec Prerequisites - - -To use StepMake with a package you need: - -@itemize @bullet -@item A GNU system: StepMake is known to work on these GNU systems: Linux - (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and Solaris. - If you have the Cygnus WINDOWS32 port of the GNU utils, it will even - work in Windows NT/95, but we don't promise to support it. -@item GNU make -@item GNU autoconf -@end itemize - -@unnumberedsec Recommended - - -Although not strictly necessary, these are recommended to have. - -@itemize @bullet -@item Python -@item Yodl. All documentation will be in Yodl. (1.22.jcn3) -@item GNU find -@end itemize - -@unnumberedsec Internals - - -Over time, we put a lot of effort in the configure, make, distribute -system (CMDS) for LilyPond. Some months ago, we realised it was not -standard GNU --- we require GNU make for building, and Python for extra -scripting. In an effort to be more GNU, we tried automake, but after two -weeks we realised the costs were too high for us and we reverted to our -own system (see @file{automake.urgh}). Not long after that i was confronted -with two other packages that lacked a decent CMDS. I realised that Lily's -would be perfect, it's modular and easy. The only problem was to make a -clean cut between generic and Lily specific stuff. The result was -StepMake: a bunch of generic makefiles, found in: -@example - - stepmake/stepmake/*.make - -@end example - -eneric helper scripts: -@example - - stepmake/bin/*.sh - stepmake/bin/*.py - -@end example - -and modular configure functions: -@example - - stepmake/configure.in - stepmake/aclocal.m4 - stepmake/config.hh.in - stepmake/config.make.in - -@end example - -Of course, every package has its own configure- and make peculiarities. -The best way to create the configure scripts is to copy them from -stepmake@footnote{Actually, stepmake/bin/stepmakeise.sh will do -that for you.} into you package's toplevel directory. For most -packages, you'll only have to comment in/out some functions in -@file{configure.in}. - -Package specific makefiles go in: -@example - - make/Targets.make - make/Rulese.make - make/Substitute.make - -@end example - -and are included by the generic StepMake makefiles. - -@unnumberedsec Maintaining - - -If you want to make and manage (binary) distributions, create and apply -patches, you'll need some framework that's outside of the package's -sourcetree. -For a number of simple maintenance tasks, StepMake will therefore assume -the following directory structure: - -Check and update the layout with the command: -@example - - ./stepmake/bin/stepdirs.sh - -@end example - -@unnumberedsec See also - - -@code{../PATCHES.txt} - -@unnumberedsec Configuring - - -Stepmake comes with a number of precooked configure functions for -general needs, such as AC_STEPMAKE_COMPILE for simple C development -and AC_STEPMAKE_CXX for C++. - -See configure.in and comment in/out the functions that your package -needs. For specific needs, you can write your own autoconf code, -see @code{info autoconf}. - -@example - - doos/ # gnu/windows32 build and binary releases - harmonia -> harmonia-x.y.z - harmonia-x.y.z/ - lilypond -> lilypond-x.y.z # symlink to development directory - lilypond-x.y.z/ # current development - patches/ # patches between different releases - RedHat/BUILD # RedHat build and binary releases - RedHat/RPMS - RedHat/SPECS - releases/ # .tar.gz releases - test/ # tarballs and diffs from current version - yodl -> yodl-1.30.17 - yodl-1.30.17 - -@end example - -with prefix @file{$HOME/usr/src} -and (for building rpms only) in @file{$HOME/.rpmrc}: -@example - - topdir: /home/fred/usr/src/RedHat - -@end example - - -@unnumberedsec Authors - -@itemize @bullet -@item @email{hanwen@@cs.uu.nl, Han-Wen Nienhuys}, - @uref{http://www.cs.uu.nl/people/hanwen} - @* - Main author. - -@item @email{janneke@@gnu.org, Jan Nieuwenhuizen}, - @uref{http://www.xs4all.nl/~jantien} - @* - Main author. -@item @email{daboys@@austin.rr.com, Jeffrey B. Reed}, - Windows-nt fixes. -@end itemize - - -@bye diff --git a/stepmake/README b/stepmake/README deleted file mode 100644 index a29e0e50e5..0000000000 --- a/stepmake/README +++ /dev/null @@ -1,19 +0,0 @@ -StepMake - -This is a simple generic make package. -It is being used by LilyPond and Harmonia -(and StepMake itself, of course) - -You're looking at her embryonal state -- things are *supposed* -to be broken. - -Fixes/patches/suggestions appreciated. - -StepMake 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 3 of the License, or -(at your option) any later version. - -Jan Nieuwenhuizen -ftp://pcnov095.win.tue.nl/pub/lilypond/development - diff --git a/stepmake/autogen.sh b/stepmake/autogen.sh deleted file mode 100755 index 34c022e082..0000000000 --- a/stepmake/autogen.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh -# Run this to generate configure and initial GNUmakefiles - -srcdir=`dirname $0` - -case $1 in - --noconf*) NOCONFIGURE=true;; -esac - -if [ ! -f aclocal.m4 -o stepmake/aclocal.m4 -nt aclocal.m4 ]; then - echo "stepmake/aclocal.m4 is newer. Copying file." - cp -f stepmake/aclocal.m4 aclocal.m4 -fi - -if [ ! -f autogen.sh -o stepmake/autogen.sh -nt autogen.sh ]; then - echo "stepmake/autogen.sh is newer. Copying file." - cp -f stepmake/autogen.sh autogen.sh - exec ./autogen.sh "$@" -fi - -for i in $srcdir/configure.in #`find $srcdir -name configure.in -print` -do - dir=`dirname $i` - echo processing $dir - ( - cd $dir - echo "Running autoconf ..." - autoconf || exit 1 - ) - # Autoconf automatically checks its own minimum required - # version, and it aborts when the check fails. - test "$?" -eq 1 && exit 1 -done - -#conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c -if test -n "$NOCONFIGURE"; then - echo Skipping configure process. - exit 0 -fi - -if test -z "$*"; then - cat < $urg - echo `. $urg` - rm -f $urg -} - -if [ -r stepmake ]; then - . ./stepmake/VERSION - if [ "x$PACKAGE_NAME" != "xStepMake" ]; then - echo "$name: huh 1?" - exit 1 - fi - echo "Stepmake found" - printf "Checking version..." - VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL - # urg - version=$VERSION - if [ "$MY_PATCH_LEVEL" != "" ]; then - VERSION=$VERSION.$MY_PATCH_LEVEL - fi - echo " $version" -else - VERSION="0.0.0" - version=$VERSION -fi - -if [ true ]; then - # urg - printf "Checking latest..." - if [ ! -r $reldir ]; then - echo "$name: huh 2?" - exit 1 - fi - LATEST=`cd $reldir; ls -t1 stepmake-*.tar.gz | head -n 1 | sed 's!stepmake-!!' | sed 's!.tar.gz!!'` - # urg - latest=`echo $LATEST | sed 's/\.[a-zA-Z][a-zA-Z]*[0-9]*$//'` - latest_val=`value $latest` - echo " $latest" - version_val=`value $version` - if [ $latest_val -le $version_val ]; then - echo "relax, StepMake is up to date" - exit 0 - fi - printf "Updating StepMake..." - (set +x; rm -rf stepmake; tar xzf $reldir/stepmake-$LATEST.tar.gz; mv stepmake-$LATEST stepmake) - echo "ok" -fi - -if [ -r VERSION ]; then - echo "$name: warning: VERSION found: not stepmakeising" - echo "You should rerun configure" - rm -f Makefile - exit 0 -fi - -files="VERSION make aclocal.in configure.in config.hh.in config.make.in" -for i in $files; do - if [ -r $i ]; then - echo "$name: can't stepmakise: $i already present" - exit 1 - fi -done - -printf "Stepmakeising..." -for i in $files; do - cp -prv stepmake/$i . -done - -cat < $@ +# Don't use $(buildscript-dir)/make-version, because it is not known whether +# build process has visited scripts/build +$(outdir)/version.hh: $(depth)/VERSION $(config_make) $(top-src-dir)/scripts/build/make-version.py + $(PYTHON) $(top-src-dir)/scripts/build/make-version.py $< > $@ $(outdir)/config.hh: $(config_h) cp -p $< $@ diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make index da7d704756..b0fc521e93 100644 --- a/stepmake/stepmake/generic-vars.make +++ b/stepmake/stepmake/generic-vars.make @@ -39,12 +39,11 @@ distname = $(package)-$(TOPLEVEL_VERSION) doc-dir = $(src-depth)/Documentation po-srcdir = $(src-depth)/po po-outdir = $(depth)/po/$(outdir) -step-bindir = $(stepmake)/bin # stepmake package support. DEPTH = $(depth)/$(package-depth) -INSTALLPY=$(PYTHON) $(step-bindir)/install.py -c +INSTALLPY=$(buildscript-dir)/install -c INSTALL=$(INSTALLPY) group-dir = $(shell cd $(DEPTH);pwd)/.. diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make index b1a05f0d0b..bdabb19477 100644 --- a/stepmake/stepmake/toplevel-targets.make +++ b/stepmake/stepmake/toplevel-targets.make @@ -14,16 +14,6 @@ local-maintainerclean: GNUmakefile: GNUmakefile.in $(MAKE) INFILE=$< OUTFILE=$@ -f $(stepdir)/automatically-generated.sub.make -ifneq ($(PACKAGE),STEPMAKE) -aclocal.m4: $(stepmake)/aclocal.m4 - $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=dnl -f $(stepdir)/automatically-generated.sub.make - -autogen.sh: $(stepmake)/autogen.sh - $(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=\# -f $(stepdir)/automatically-generated.sub.make - chmod +x autogen.sh -endif - - $(package-icon): $(MAKE) -C Documentation/logo icon -- 2.39.2