home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-12-08 | 4.1 KB | 134 lines |
- # This makefile automates generating Lovelace tutorial files
- # from its source files (.les) files.
-
- # It is unabashedly Unix-dependent, though translating it to some
- # other system (like MS-DOS) shouldn't be too hard if desired.
- # It's intended for my (David A. Wheeler's) personal use,
- # but I'm including it in the distribution since it might be useful.
-
- # Definitions of generic lesson-generating rules.
-
- # The "-s" option in mklesson generates short filename extensions
- # (.htm instead of .html):
-
- MKLESSON=mklesson -s
-
- .les.tim:
- $(MKLESSON) $<
-
- SUFFIXES += .tim .les
-
- .SUFFIXES : $(SUFFIXES)
-
- # Makefile variable definitions for file generation.
-
- OBJECT_FILES = lesson1.tim lesson2.tim lesson3.tim lesson4.tim \
- lesson5.tim lesson6.tim lesson7.tim lesson8.tim \
- lesson9.tim lesson10.tim lesson11.tim lesson12.tim \
- lesson13.tim lesson14.tim lesson15.tim lesson16.tim \
- lesson17.tim
-
- # Lesson 18 is _NOT_ listed in OBJECT_FILES because it's generated
- # while generating program "Small".
- # However, the source file (lesson18.les) _is_ included in Lovelace.
-
- MKLESSON_FILES = readme gpl lgpl userg.htm mklesson template default \
- formattm.htm formatmk.txt blank.les new_sect \
- previous.gif next.gif up.gif tinyhome.gif \
- skip1-1.htm txt-temp makefile
-
- # File name of the "last lesson" (i.e. the lesson/section that doesn't exist)
- LAST_LESSON = s19-1.htm
-
-
- # Rules for file generation; default is "all".
-
- # Comments to myself:
- # Before running this command "for real", regenerate all files for
- # program Small, and from the Small directory "make install".
- # This will place Small results into the Lovelace files.
- # To everyone else this will make no difference, since Small is distributed
- # as part of Lovelace.
-
- # Note all the checking systems;
- # weblint looks for HTML errors, hspell for spelling errors, and
- # gcc calls GNAT to check for Ada syntax errors.
- # Perhaps later I'll add "-gnatg" and explicitly use GNAT style.
-
- all: $(OBJECT_FILES) comments.htm
- echo "Make sure you've install the program Small files."
- cp fini.htm $(LAST_LESSON)
- chmod ugo+r [a-z]*
- weblint -e bad-link,mailto-link,upper-case \
- -d heading-order,empty-container -x netscape *.htm
- hspell -x comments.htm *.htm
- gcc -c -gnatc -gnatk8 *.adb *.ads
-
- comments.htm: comments.hd COMMENTS comments.tl
- mkcomm
-
- clean:
- echo > ,temp.BAK
- rm *.BAK
-
- really_clean: clean
- rm *.tim
- rm s[1-9]-[1-9f].htm s[1-9][1-9]-[1-9f].htm
- rm s[1-9]-[1-9f]r[1-9].htm s[1-9][1-9]-[1-9f]r[1-9].htm
-
- print:
- lprpr *.les &
-
-
- # Eventually add a "make check" entry, to perform a
- # weblint, spellcheck, and a clean-compilation check.
-
- # There's an implied order here:
- # 1. Edit version files (lversion.htm, lovelace.htm, and version).
- # 2. "make ci_all" to check in all local files.
- # 3. "make distribute" to create the .zip, .tar.gz, and the WWW version.
- # The distribution files do not contain old versions of
- # documents (i.e. my RCS and OLD directories are not sent on).
-
-
- # Check in every file in the (local) RCS directory.
-
- ci_all:
- echo "You should have already edited these files:"
- echo "Files: version, lovelace.htm, lversion.htm"
- echo "Checking in all RCS files."
- ci -l RCS/*
- echo "Version Number is:"
- cat < version
- echo "If all's okay, execute this and make distribute:"
- echo 'rcs -Nversion: RCS/*'
- echo "Where version is Lversion.number (without the period)"
-
- # "ci_all" doesn't do the rcs command because it's easy to
- # forget to upgrade all the version files.
-
-
- distribute: clean
- rm -f stats
- lcount > stats
- chmod ugo+r [a-z]*
- rm -f lovelace.zip lovelace.tar.gz
- zip -9 lovelace.zip [a-z]* -x `cat exclude`
- tar cvfX - exclude [a-z]* > lovelace.tar
- gzip --best lovelace.tar
- rm -f mklesson.tar.gz mklesson.zip
- zip -9 mklesson.zip $(MKLESSON_FILES) -x `cat exclude`
- tar cvf - $(MKLESSON_FILES) > mklesson.tar
- gzip mklesson.tar
- chmod ugo+r *.zip *.gz
- rm -fr CELLO
- mkdir CELLO
- cp -p JUST_CELLO/* CELLO
- cp -p [a-z]* CELLO
- cd CELLO; zip -9 LV-CELLO.zip [a-z]* -x `cat exclude`
- mv CELLO/LV-CELLO.zip .
- rm -fr CELLO
- tar cvf - WWW_install [a-z]* > WWW_LOVELACE.tar
- chmod a+r WWW_LOVELACE.tar
-
-