delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/12/15:47:51

From: pderbysh AT o DOT net (SpamKiLr)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bug in Make? Completely incorrect behavior.
Organization: Spam Haters Anonymous, insert the three letter name of the country south of Canada and a dot before "net" to unmunge.
Message-ID: <387cbecb.61560172@news.globalserve.net>
References: <387bc68e DOT 493166929 AT news DOT globalserve DOT net> <Pine DOT SUN DOT 3 DOT 91 DOT 1000112090212 DOT 28074P-100000 AT is> <387c53ff DOT 34216248 AT news DOT globalserve DOT net> <Pine DOT SUN DOT 3 DOT 91 DOT 1000112154552 DOT 258B-100000 AT is>
X-Newsreader: Forte Free Agent 1.11/32.235
Lines: 338
Date: Wed, 12 Jan 2000 17:58:51 GMT
NNTP-Posting-Host: 207.176.153.34
X-Complaints-To: news AT primus DOT ca
X-Trace: news2.tor.primus.ca 947700643 207.176.153.34 (Wed, 12 Jan 2000 13:10:43 EST)
NNTP-Posting-Date: Wed, 12 Jan 2000 13:10:43 EST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Here it is. (I still don't see how a list of dependencies, none of
which themselves need to be built, can possibly cause a problem.)

I've found that my news agent is inserting extra line breaks at about
sixty-something columns, and have tried formatting the line lengths
below and inserting backslashes to produce a sixty column version.


#  Protomatter makefile
#  Protomatter version 1.0
#  January 9 2000
#  Copyright (c) Paul Derbyshire
#  See license.txt




#########################################
#      Variables to be configured.      #
#########################################


#######################
#  Directories at the bases of the source, code, and docs hierarchies
#  and target directories for jars.
#######################

BASEDIR = ..
SRCDIR = $(BASEDIR)/source
CLASSDIR = $(BASEDIR)/class
DOCSDIR = $(BASEDIR)/doc
CODEJARDIR = $(BASEDIR)/program
DOCSJARDIR = $(BASEDIR)
SOURCEJARDIR = $(BASEDIR)





#######################
#  Jar file names.
#######################

CODEJARNAME = protomatter
DOCSJARNAME = pmdocs
SOURCEJARNAME = pmsource





#######################
#  Jar base directories.
#######################

CODEJARBASE = $(CLASSDIR)
DOCSJARBASE = $(BASEDIR)
SOURCEJARBASE = $(BASEDIR)





#######################
#  Variables used in making the API documentation.
#######################

WINDOWTITLE = "Protomatter API Documentation"
DOCTITLE = "The Protomatter API"
HFTEXT = "Protomatter API Documentation<br>v1.0<br>Copyright (c) 2000\
Protoware<br>See license.txt"
JAVAURL = http://java.sun.com/products/jdk/1.3/docs/api




#######################
#  Compilation options
#######################

COMPILEFLAGS = 





#######################
#  Packages and relative directories -- must be updated manually as
#  source tree and package tree change.
#######################

#  All package names
PACKAGES = pgd.protomatter pgd.protomatter.fractal

#  All package directory structure directories, relative to base of
#  package hierarchy.
#  NOTE: Directories must be listed in order such that a directory's
#  parent is listed before the directory.
PACKDIRS = . pgd pgd/protomatter pgd/protomatter/fractal

#  All package directory structure directories that contain .java
#  files in the source tree, relative
#  to base of package hierarchy.
REALPACKDIRS = pgd/protomatter pgd/protomatter/fractal

#  All auxiliary directories, relative to base of source or object
#  hierarchy.
#  NOTE: Directories must be listed in order such that a directory's
#  parent is listed before the directory.
AUXDIRS = 

#  All auxiliary document directories (i.e. dirs like
#  foo/bar/doc-files in the source tree), relative to base of package
#  hierarchy.
#  NOTE: Directories must be listed in order such that a directory's
#  parent is listed before the directory.
AUXDOCDIRS = 









#####################################################################################
#      Everything below this point is auto-generated and shouldn't be
#      touched.
#####################################################################################


#######################
#  Auto-generated directory and file lists.
#######################

#  Various collections of absolute directories, autogenerated.
SOURCEDIRS = $(SRCDIR) $(foreach DIR,$(PACKDIRS),$(SRCDIR)/$(DIR))
REALSOURCEDIRS = $(SRCDIR) $(foreach\
DIR,$(REALPACKDIRS),$(SRCDIR)/$(DIR))
CLASSDIRS = $(CLASSDIR) $(foreach DIR,$(PACKDIRS),$(CLASSDIR)/$(DIR))
DOCDIRS = $(DOCSDIR) $(foreach DIR,$(PACKDIRS),$(DOCSDIR)/$(DIR))
AUXSRCDIRS = $(foreach DIR,$(AUXDIRS),$(SRCDIR)/$(DIR))
AUXOUTDIRS = $(foreach DIR,$(AUXDIRS),$(CLASSDIR)/$(DIR))
AUXDOCSRCDIRS = $(foreach DIR,$(AUXDOCDIRS),$(SRCDIR)/$(DIR))
AUXDOCOUTDIRS = $(foreach DIR,$(AUXDOCDIRS),$(CLASSDIR)/$(DIR))

#  Lists of source files, autogenerated.
CODESOURCEFILES = $(foreach DIR,$(SOURCEDIRS),$(wildcard\
$(DIR)/*.java))
DOCSOURCEFILES = $(CODESOURCEFILES) $(foreach\
DIR,$(SOURCEDIRS),$(wildcard $(DIR)/*.html))\
$(foreach DIR,$(AUXDOCSRCDIRS),$(wildcard $(DIR)/*))
AUXSRCFILES = $(foreach DIR,$(AUXSRCDIRS),$(wildcard $(DIR)/*))
ALLSOURCEFILES = $(foreach DIR,$(SOURCEDIRS),$(wildcard $(DIR)/*))
ALLSOURCEFILESREL = $(foreach SOURCE,$(ALLSOURCEFILES),$(subst\
$(SOURCEJARBASE)/,,$(AUX)))
MANIFESTFILE = $(SRCDIR)/Manifest-Info

#  Lists of class files, autogenerated.
CLASSFILES = $(foreach SOURCE,$(CODESOURCEFILES),$(subst\
$(SRCDIR),$(CLASSDIR),$(subst .java,.class,$(SOURCE))))
CLASSFILESX = $(foreach DIR,$(CLASSDIRS),$(wildcard $(DIR)/*.class))
CLASSFILESREL = $(foreach CLASS,$(CLASSFILESX),$(subst\
$(CODEJARBASE)/,,$(CLASS)))

#  Lists of auxiliary output files, autogenerated.
AUXOUTFILES = $(foreach DIR,$(AUXOUTDIRS),$(wildcard $(DIR)/*))
AUXOUTFILESREL = $(foreach AUX,$(AUXOUTFILES),$(subst\
$(CODEJARBASE)/,,$(AUX)))

#  Lists of doc output files, autogenerated.
#  DOCTARGETFILES = $(MISCHTMLDOCFILES) $(CLASSDOCFILES)\
$(CLASSUSEDOCFILES) $(PACKAGEHTMLDOCFILES)
DOCTARGETFILE = $(DOCSDIR)/allclasses-frame.html 
DOCFILES = $(MISCDOCFILES) $(CLASSDOCFILES) $(CLASSUSEDOCFILES)\
$(PACKAGEDOCFILES) $(AUXDOCFILES)
DOCFILESREL = $(foreach DOC,$(DOCFILES),$(subst\
$(DOCSJARBASE)/,,$(AUX)))

#  Used in generating the above.
CLASSDOCFILES = $(foreach SOURCE,$(CODESOURCEFILES),$(subst\
$(SRCDIR),$(DOCSDIR),$(subst .java,.html,$(SOURCE))))
CLASSUSEDOCFILES = $(foreach SOURCE,$(CODESOURCEFILES),$(dir\
SOURCE)class-use/$(subst .java,.html,$(notdir $(SOURCE))))
PACKAGEHTMLDOCFILES = $(PACKAGESUMMARYDOCFILES)\
$(PACKAGEFRAMEDOCFILES) $(PACKAGETREEDOCFILES)
PACKAGEDOCFILES = $(PACKAGESUMMARYDOCFILES) $(PACKAGEFRAMEDOCFILES)\
$(PACKAGETREEDOCFILES) $(PACKAGEUSEDOCFILES)
PACKAGESUMMARYDOCFILES =  $(foreach\
DIR,$(REALPACKDIRS),$(DOCSDIR)/$(DIR)/package-summary.html)
PACKAGEFRAMEDOCFILES =  $(foreach\
DIR,$(REALPACKDIRS),$(DOCSDIR)/$(DIR)/package-frame.html)
PACKAGETREEDOCFILES =  $(foreach\
DIR,$(REALPACKDIRS),$(DOCSDIR)/$(DIR)/package-tree.html)
PACKAGEUSEDOCFILES =  $(foreach\
DIR,$(REALPACKDIRS),$(DOCSDIR)/$(DIR)/package-use)
AUXDOCFILES = $(foreach DIR,$(AUXDOCOUTDIRS),$(wildcard $(DIR)/*))
MISCDOCFILES1 = index.html overview-summary.html overview-tree.html\
deprecated-list.html serialized-form.html\
overview-frame.html allclasses-frame.html help-doc.html\
index-all.html package-list stylesheet.css
MISCDOCFILES = $(foreach DOC,$(MISCDOCFILES1),$(DOCSDIR)/$(DOC))
MISCHTMLDOCFILES1 = index.html overview-summary.html\
overview-tree.html deprecated-list.html serialized-form.html\
overview-frame.html allclasses-frame.html help-doc.html index-all.html
MISCHTMLDOCFILES = $(foreach\
DOC,$(MISCHTMLDOCFILES1),$(DOCSDIR)/$(DOC))





#######################
#  Jar fully-qualified names, autogenerated.
#######################

CODEJAR = $(CODEJARDIR)/$(CODEJARNAME).jar
DOCSJAR = $(DOCSJARDIR)/$(DOCSJARNAME).jar
SOURCEJAR = $(SOURCEJARDIR)/$(SOURCEJARNAME).jar





#######################
#  Miscellaneous auto-generated variables.
#######################

define LINEFEED


endef









##########################################################################################
#      Rules for making the program, source, and documentation jars
#      for Protomatter
##########################################################################################


#######################
#  Rule to rebuild everything.
#######################

#  Comprehensive target -- creates program, API doc, and source jars.
.PHONY: all



all: $(CODEJAR) $(DOCSJAR) $(SOURCEJAR)





#######################
#  Rules to build program jar.
#######################

#  compiles code and updates executable jar
$(CODEJAR): $(CLASSFILES) $(AUXOUTFILES) $(MANIFESTFILE)
	jar cmfu $(MANIFESTFILE) $(CODEJAR) -C $(CODEJARBASE)\
$(CLASSFILESREL) $(AUXOUTFILESREL)

#  compiles the Java source files
$(CLASSFILES): $(CODESOURCEFILES)
	javac $(COMPILEOPTIONS) -sourcepath $(SRCDIR) -d $(CLASSDIR)\
$(subst $(CLASSDIR)/,,$(subst .class,.java,$@))

#  copies everything in the aux dirs under source into the same dirs
#  under classes
$(AUXOUTFILES): $(AUXSRCFILES)
	copy $(subst $(CLASSDIR),$(SRCDIR),$@) $@





#######################
#  Rules to rebuild API docs archive.
#######################

#  Redoes API documentation from scratch if any source files have
#  changed. Unfortunately, there's no way for make to tell
#  that it only needs to do this if the doc comments have changed --
#  or for that matter for it to tell whether doc
#  comments haven't changed. :-)

#  Makes API docs jar
$(DOCSJAR): $(DOCTARGETFILE)
	jar cfu $(DOCSJAR) -C $(DOCSJARBASE) $(DOCFILESREL)

#  Makes API docs
$(DOCTARGETFILE): $(DOCSOURCEFILES)                                \
	javadoc -sourcepath $(SRCDIR)\
                -overview $(SRCDIR)/pgd/protomatter/overview.html\
                -d $(SRCDIR)/docs\
                -use -version -author\
                -windowtitle $(WINDOWTITLE)\
                -doctitle $(DOCTITLE)\
                -header $(HFTEXT)\
                -footer $(HFTEXT)\
                -link $(JAVAURL)\
                -group "Protomatter Application Core"\
"pgd.protomatter*"\
                -group "Fractal Types" "pgd.fractal*"\
                -serialwarn\
                $(PACKAGES)





#######################
#  Rule to rebuild source archive.
#######################

#  Constructs source jar
$(SOURCEJAR): $(ALLSOURCEFILES)
	jar cfu $(SOURCEJAR) -C $(SOURCEJARBASE) $(ALLSOURCEFILESREL)










- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019