Raw File
Tip revision: 2320edc933b15df745fbea732b33e41825514763 authored by Joshua Cogliati on 18 August 2021, 02:28 UTC
Merge pull request #114 from dmalec/UPDATE-PACKAGES-ON-LINUX-ACTIONS
Tip revision: 2320edc
SUBDIRS = logolib csls helpfiles tests
SUBDIRS += docs

bin_PROGRAMS = ucblogo


 -DLIBLOC='"$(logolibdir)"'		\
 -DHELPLOC='"$(helpfilesdir)"'		\
 -DCSLSLOC='"$(cslsdir)"'		\

ucblogo_SOURCES = coms.c error.c eval.c files.c graphics.c init.c	\
 intern.c libloc.c lists.c logodata.c main.c math.c mem.c paren.c	\
 parse.c print.c wrksp.c

ucblogo_SOURCES += obj.c

# The file git.c is a "built source" (see automake info page "Built
# Sources Example"), a conditional source file, and should not be
# included in distribution tarballs. It also may need to be
# regenerated even if it seems up to date, since make cannot tell if a
# git commit has occurred since git.c was generated. This is
# accomplished by making it depend on a dummy phony target, which is
# by definition never up to date. During regeneration, if git.c exists
# it is replaced only if the new version differs, in order to avoid
# unnecessary recompilation or linking.
nodist_ucblogo_SOURCES = git.c
git.c: FORCE
	echo 'char* GIT = "('`git describe --always||echo -n NA`')";' > git-c-temp
	if cmp --quiet git-c-temp $@; then echo "$@ already up to date"; else echo "Refreshing $@"; mv git-c-temp $@; fi

if WX
# need C++ linker
ucblogo_SOURCES += wxMain.cpp wxTerminal.cpp wxCommandHistory.cpp wxTurtleGraphics.cpp
ucblogo_SOURCES += TextEditor.cpp
ucblogo_SOURCES += wxterm.c
# do not need C++ linker, no good way to avoid it though
ucblogo_SOURCES += term.c
if X11
ucblogo_SOURCES += xgraphics.c
ucblogo_SOURCES += nographics.c

# Desktop file, see

desktopdir = $(datadir)/applications
dist_desktop_DATA = ucblogo.desktop

# Icons

icons256dir = $(datadir)/icons/hicolor/256x256/apps
pixmapsdir = $(datadir)/pixmaps
dist_icons256_DATA = ucblogo.png
dist_pixmaps_DATA = ucblogo.xpm

# Include otherwise-skipped files in distribution tarball

# #include files used in build
EXTRA_DIST = eval.h globals.h gpl_text.h LogoFrame.h logo.h		\
 nographics.h obj.h TextEditor.h wxGlobals.h wxGraphics.h wxMain.h	\
 wxTerminal.h wxCommandHistory.h wxTurtleGraphics.h xgraphics.h

# Source for utility program for regenerating ./helpfiles/ from ./usermanual
# See below; needs to run in build environment.
EXTRA_DIST += makehelp.c

# Misc information, documentation, historical files, etc
EXTRA_DIST += changes.txt config.h.msys .gitignore	\
 gpl.html Info.plist kdbgrc.logo LICENSE logo.icns logo-Info.plist	\
 logologo.ico logologo.png logo_win.rc makefile.msys newtermnotes	\
 pbdevelopment.plist PkgInfo plm ucblogo.bmp ucblogo.dsp	\
 ucblogo.dsw usermanual inno/ucblogo.iss

# Diagram of evaluator, in three formats because hey why not
EXTRA_DIST += evaluator.pdf evaluator.svg

# Win32 API compliant graphics routines (unused)
EXTRA_DIST += win32trm.c win32trm.h

# IBM-specific graphics routines (unused)
EXTRA_DIST += ztcterm.c ztcterm.h

# Macintosh graphics routines (unused)
EXTRA_DIST += macterm.c macterm.h

# Something to do with fonts on a Macintosh (unused)
EXTRA_DIST += mac-fontmod/include/wx/mac/carbon/fontdlg.h	\
 mac-fontmod/include/wx/mac/carbon/private.h			\
 mac-fontmod/include/wx/mac/fontdlg.h				\
 mac-fontmod/src/mac/carbon/bfontdlg.cpp			\
 mac-fontmod/src/mac/carbon/			\
 mac-fontmod/src/mac/carbon/fontdlg.cpp				\
# makehelp_SOURCES = makehelp.c

# Make sure pdf built for distributions
EXTRA_DIST += docs/ucblogo.pdf

docs/ucblogo.pdf: docs/ucblogo.texi
	cd docs && $(MAKE) ucblogo.pdf

helpfiles/HELPCONTENTS helpfiles/ALL_NAMES: regenerate-help-index

# Redirection with this phony target avoids the stanza being run
# twice, thus avoiding unecessary work and a race condition.

.PHONY: regenerate-help-index

regenerate-help-index: makehelp usermanual
	@echo "Regenerates entire contents of helpfiles/, including index, from usermanual."
	@echo "Grave accent as filename is impossible with automake so work around it."
	mv -v helpfiles/'`' helpfiles/RENAME-GRAVE-ACCENT
	LC_ALL=C sort helptemp | pr -5 -t -l999 -w80 >> helpfiles/HELPCONTENTS
	-rm helptemp

all: regenerate-help-index

mac: ucblogo helpfiles/HELPCONTENTS helpfiles/ALL_NAMES
	mkdir -p
	mkdir -p
	cp Info.plist
	cp PkgInfo
	cp pbdevelopment.plist
	mkdir -p
	cp csls/[a-z]*
	cp -r helpfiles
	cp -r logolib
	cp logo.icns
	mkdir -p
	cp ucblogo

ucblogo.dmg : mac docs/ucblogo.pdf
	rm -f ucblogo.dmg ucblogo_base.dmg
	hdiutil create -size 15m -fs HFS+ -volname "UCBLogo" ucblogo_base.dmg
	hdiutil attach ucblogo_base.dmg
	cp -a /Volumes/UCBLogo/
	cp docs/ucblogo.pdf /Volumes/UCBLogo/UCBLogoUserManual.pdf
	hdiutil detach /Volumes/UCBLogo/
	hdiutil convert ucblogo_base.dmg -format UDZO -o ucblogo.dmg
back to top