Skip to content

Commit

Permalink
More install cleanup, build proper macOS application bundle.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Mar 20, 2017
1 parent 480ac84 commit 4903e3a
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 44 deletions.
11 changes: 5 additions & 6 deletions data/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for HTMLDOC data files.
#
# Copyright 2011 by Michael R Sweet.
# Copyright 2011-2017 by Michael R Sweet.
# Copyright 1997-2010 by Easy Software Products.
#
# This program is free software. Distribution and use rights are outlined in
Expand Down Expand Up @@ -39,11 +39,10 @@ all:
#

install:
if [ ! -d $(datadir)/htmldoc/data ]; then\
$(MKDIR) $(datadir)/htmldoc/data;\
fi
$(CP) $(FILES) $(datadir)/htmldoc/data
$(CHMOD) ugo+r $(datadir)/htmldoc/data/*
$(INSTALL_DIR) $(BUILDROOT)$(datadir)/htmldoc/data
for file in $(FILES); do \
$(INSTALL_DATA) $$file $(BUILDROOT)$(datadir)/htmldoc/data; \
done


#
Expand Down
6 changes: 3 additions & 3 deletions desktop/htmldoc.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string>htmldoc</string>

<key>CFBundleIdentifier</key>
<string>com.easysw.htmldoc</string>
<string>org.msweet.htmldoc</string>

<key>CFBundleVersion</key>
<string>@SVERSION@</string>
Expand All @@ -17,7 +17,7 @@
<string>English</string>

<key>NSHumanReadableCopyright</key>
<string>Copyright 1997-2010 by Easy Software Products (http://www.easysw.com/)</string>
<string>Copyright 1997-2017 by Michael R Sweet</string>

<key>CFAppleHelpAnchor</key>
<string>help</string>
Expand All @@ -38,7 +38,7 @@
<string>@SVERSION@</string>

<key>CFBundleGetInfoString</key>
<string>@SVERSION@, Copyright Easy Software Products 1997-2010</string>
<string>@SVERSION@, Copyright Michael R Sweet 1997-2017</string>

<key>CFBundleDocumentTypes</key>
<array>
Expand Down
16 changes: 6 additions & 10 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,12 @@ all: $(DOCUMENTS) htmldoc.1
#

install: $(DOCUMENTS)
if test ! -d $(datadir)/doc/htmldoc; then\
$(MKDIR) $(datadir)/doc/htmldoc;\
fi
$(CP) $(DOCFILES) $(datadir)/doc/htmldoc
$(CHMOD) ugo+r $(datadir)/doc/htmldoc/*
if test ! -d $(mandir)/man1; then\
$(MKDIR) $(mandir)/man1;\
fi
$(CP) htmldoc.man $(mandir)/man1/htmldoc.1
$(CHMOD) ugo+r $(mandir)/man1/htmldoc.1
$(INSTALL_DIR) $(BUILDROOT)$(datadir)/doc/htmldoc;
for file in $(DOCFILES); do \
$(INSTALL_DATA) $$file $(BUILDROOT)$(datadir)/doc/htmldoc; \
done
$(INSTALL_DIR) $(BUILDROOT)$(mandir)/man1;
$(INSTALL_MAN) htmldoc.man $(BUILDROOT)$(mandir)/man1/htmldoc.1


#
Expand Down
7 changes: 1 addition & 6 deletions doc/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ <H2>Language Level</H2>
<H2>Send Printer Commands</H2>

Click in the <I>Send Printer Commands</I> check box to enable to
disable printer commands in the PostScript output files.
disable printer commands in the PostScript output files.
Printer commands are not supported for PostScript Level 1
output.

Expand Down Expand Up @@ -613,11 +613,6 @@ <H2>Tooltips</H2>

<P>Check the <I>Tooltips</I> button to enable tooltips on GUI controls.

<H2>Modern Look</H2>

<P>Check the <I>Modern Look</I> button to enable GUI controls
with a modern appearance.

<H2>Strict HTML</H2>

<P>Check the <I>Strict HTML</I> button to enable strict HTML conformance
Expand Down
17 changes: 7 additions & 10 deletions fonts/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for HTMLDOC font files.
#
# Copyright 2011 by Michael R Sweet.
# Copyright 2011-2017 by Michael R Sweet.
# Copyright 1997-2010 by Easy Software Products.
#
# This program is free software. Distribution and use rights are outlined in
Expand Down Expand Up @@ -61,14 +61,11 @@ all:

install:
echo "Installing font files in $(datadir)/htmldoc/fonts..."
if [ ! -d $(datadir)/htmldoc/fonts ]; then\
$(MKDIR) $(datadir)/htmldoc/fonts;\
fi
$(INSTALL_DIR) $(BUILDROOT)$(datadir)/htmldoc/fonts
for font in $(FONTS); do \
$(CP) $$font.afm $(datadir)/htmldoc/fonts; \
$(CP) $$font.pfa $(datadir)/htmldoc/fonts; \
$(INSTALL_DATA) $$font.afm $(BUILDROOT)$(datadir)/htmldoc/fonts; \
$(INSTALL_DATA) $$font.pfa $(BUILDROOT)$(datadir)/htmldoc/fonts; \
done
$(CHMOD) ugo+r $(datadir)/htmldoc/fonts/*


#
Expand All @@ -78,10 +75,10 @@ install:
uninstall:
echo "Uninstalling font files from $(datadir)/htmldoc/fonts..."
for font in $(FONTS); do \
$(RM) $(datadir)/htmldoc/fonts/$$font.afm; \
$(RM) $(datadir)/htmldoc/fonts/$$font.pfa; \
$(RM) $(BUILDROOT)$(datadir)/htmldoc/fonts/$$font.afm; \
$(RM) $(BUILDROOT)$(datadir)/htmldoc/fonts/$$font.pfa; \
done
-$(RMDIR) $(datadir)/htmldoc/fonts
-$(RMDIR) $(BUILDROOT)$(datadir)/htmldoc/fonts


#
Expand Down
44 changes: 35 additions & 9 deletions htmldoc/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Makefile for HTMLDOC, an HTML document processing program.
#
# Copyright 2011-2016 by Michael R Sweet.
# Copyright 2011-2017 by Michael R Sweet.
# Copyright 1997-2010 by Easy Software Products.
#
# This program is free software. Distribution and use rights are outlined in
Expand Down Expand Up @@ -36,27 +36,25 @@ all: htmldoc$(EXEEXT)
#

install: all
if [ ! -d $(bindir) ]; then\
$(MKDIR) $(bindir);\
fi
cp htmldoc$(EXEEXT) $(bindir)
chmod ugo+rx $(bindir)/htmldoc$(EXEEXT)
$(INSTALL_DIR) $(BUILDROOT)$(bindir)
$(INSTALL_BIN) htmldoc$(EXEEXT) $(BUILDROOT)$(bindir)


#
# Clean out object and executable files...
#

clean:
rm -f $(OBJS) htmldoc$(EXEEXT)
$(RM) $(OBJS) htmldoc$(EXEEXT)


#
# Update dependencies...
#

depend:
makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) $(OBJS:.o=.cxx) >/dev/null 2>&1
$(CC) -MM $(CFLAGS) $(OBJS:.o=.c) >Dependencies
$(CXX) -MM $(CXXFLAGS) $(OBJS:.o=.cxx) >>Dependencies


#
Expand All @@ -66,7 +64,35 @@ depend:
htmldoc$(EXEEXT): $(OBJS) ../Makedefs
echo Linking $@...
$(CXX) $(LDFLAGS) -o htmldoc$(EXEEXT) $(OBJS) $(LIBS)
$(POST) htmldoc$(EXEEXT)
if test `uname` = Darwin; then \
$(MAKE) -$(MAKEFLAGS) htmldoc.app || exit 1; \
fi

htmldoc.app: htmldoc
echo Creating application bundle...
$(RM) -r htmldoc.app
$(MKDIR) htmldoc.app
$(MKDIR) htmldoc.app/Contents
$(CP) ../desktop/htmldoc.plist htmldoc.app/Contents/Info.plist
$(MKDIR) htmldoc.app/Contents/MacOS
$(CP) htmldoc htmldoc.app/Contents/MacOS
$(MKDIR) htmldoc.app/Contents/Resources
$(CP) ../desktop/htmldoc.icns htmldoc.app/Contents/Resources
$(CP) ../doc/help.html htmldoc.app/Contents/Resources
$(MKDIR) htmldoc.app/Contents/Resources/data
$(CP) ../data/cp-* htmldoc.app/Contents/Resources/data
$(CP) ../data/iso-* htmldoc.app/Contents/Resources/data
$(CP) ../data/koi8-r htmldoc.app/Contents/Resources/data
$(CP) ../data/prolog.ps htmldoc.app/Contents/Resources/data
$(CP) ../data/psglyphs htmldoc.app/Contents/Resources/data
$(MKDIR) htmldoc.app/Contents/Resources/fonts
$(CP) ../fonts/*.afm htmldoc.app/Contents/Resources/fonts
$(CP) ../fonts/*.pfa htmldoc.app/Contents/Resources/fonts


#
# Dependencies...
#

$(OBJS): ../Makedefs
tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c
Expand Down

0 comments on commit 4903e3a

Please sign in to comment.