Skip to content

Commit

Permalink
Use install command instead of CHMOD, CP, and MKDIR.
Browse files Browse the repository at this point in the history
Drop all POSTBUILD stuff as it is no longer used.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5663 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
michaelrsweet committed Feb 6, 2007
1 parent e038163 commit 44b2ff3
Show file tree
Hide file tree
Showing 12 changed files with 160 additions and 213 deletions.
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ CHANGES IN FLTK 1.1.8

- Documentation fixes (STR #1454, STR #1455, STR #1456,
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578)
- "make install" now uses the install command (or the
included install-sh script) to copy files to the
install directories, to ensure that permissions are
correct.
- Fixed DLL generation via MingW/Cygwin (STR #1546)
- FLUID incorrectly opened the display when generating
source code for Fl_Help_View widgets (STR #1318)
Expand Down
12 changes: 6 additions & 6 deletions FL/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Header makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2005 by Bill Spitzak and others.
# Copyright 1998-2007 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
Expand Down Expand Up @@ -35,12 +35,12 @@ depend:

install:
echo "Installing include files in $(DESTDIR)$(includedir)..."
-$(MKDIR) -p $(DESTDIR)$(includedir)
-$(INSTALL_DIR) -p $(DESTDIR)$(includedir)
$(RMDIR) $(DESTDIR)$(includedir)/FL
$(MKDIR) $(DESTDIR)$(includedir)/FL
$(CHMOD) 755 $(DESTDIR)$(includedir)/FL
$(CP) ../FL/*.[hHr] $(DESTDIR)$(includedir)/FL
$(CHMOD) 644 $(DESTDIR)$(includedir)/FL/*.[hHr]
$(INSTALL_DIR) $(DESTDIR)$(includedir)/FL
for file in *.[hH]; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/FL; \
done
@HLINKS@ cd $(DESTDIR)$(includedir)/FL;\
@HLINKS@ for file in *.H; do\
@HLINKS@ $(RM) "`basename $$file H`h";\
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ all: makeinclude
install: makeinclude
-mkdir -p $(DESTDIR)$(bindir)
$(RM) $(DESTDIR)$(bindir)/fltk-config
-cp fltk-config $(DESTDIR)$(bindir)
-chmod 755 $(DESTDIR)$(bindir)/fltk-config
$(INSTALL_SCRIPT) fltk-config $(DESTDIR)$(bindir)
for dir in FL $(DIRS); do\
echo "=== installing $$dir ===";\
(cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ esac
dnl Find commands...
AC_PROG_CC
AC_PROG_CXX
dnl AC_PROG_INSTALL
AC_PROG_INSTALL
AC_PATH_PROG(NROFF,nroff)
if test "x$NROFF" = "x:"; then
AC_PATH_PROG(GROFF,groff)
Expand Down
59 changes: 24 additions & 35 deletions documentation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Documentation makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2005 by Bill Spitzak and others.
# Copyright 1998-2007 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
Expand Down Expand Up @@ -232,42 +232,31 @@ depend:

install: $(MANPAGES)
echo "Installing documentation files in $(DESTDIR)$(docdir)..."
-$(MKDIR) $(DESTDIR)$(docdir)
$(CP) $(HTMLFILES) $(IMAGEFILES) index.html $(DESTDIR)$(docdir)
$(CHMOD) 644 $(DESTDIR)$(docdir)/*.*
-$(INSTALL_DIR) $(DESTDIR)$(docdir)
for file in $(HTMLFILES) $(IMAGEFILES) index.html; do \
$(INSTALL_DATA) $$file $(DESTDIR)$(docdir); \
done
echo "Installing man pages in $(DESTDIR)$(mandir)..."
-$(MKDIR) $(DESTDIR)$(mandir)/cat1
$(CP) fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat1/fluid.$(CAT1EXT)
$(CP) fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat1/fltk-config.$(CAT1EXT)
-$(MKDIR) $(DESTDIR)$(mandir)/cat3
$(CP) fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat3/fltk.$(CAT3EXT)
-$(MKDIR) $(DESTDIR)$(mandir)/man1
$(CP) fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
$(CHMOD) 644 $(DESTDIR)$(mandir)/man1/fluid.1
$(CP) fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1
$(CHMOD) 644 $(DESTDIR)$(mandir)/man1/fltk-config.1
-$(MKDIR) $(DESTDIR)$(mandir)/man3
$(CP) fltk.man $(DESTDIR)$(mandir)/man3/fltk.3
$(CHMOD) 644 $(DESTDIR)$(mandir)/man3/fltk.3
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat1
$(INSTALL_MAN) fluid.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
$(INSTALL_MAN) fltk-config.$(CAT1EXT) $(DESTDIR)$(mandir)/cat1
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat3
$(INSTALL_MAN) fltk.$(CAT3EXT) $(DESTDIR)$(mandir)/cat3
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man1
$(INSTALL_MAN) fluid.man $(DESTDIR)$(mandir)/man1/fluid.1
$(INSTALL_MAN) fltk-config.man $(DESTDIR)$(mandir)/man1/fltk-config.1
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man3
$(INSTALL_MAN) fltk.man $(DESTDIR)$(mandir)/man3/fltk.3

install-linux install-osx:
-$(MKDIR) $(DESTDIR)$(mandir)/cat6
$(CP) blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/blocks.$(CAT6EXT)
$(CP) checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/checkers.$(CAT6EXT)
$(CP) sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(CHMOD) 644 $(DESTDIR)$(mandir)/cat6/sudoku.$(CAT6EXT)
-$(MKDIR) $(DESTDIR)$(mandir)/man6
$(CP) blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
$(CHMOD) 644 $(DESTDIR)$(mandir)/man6/blocks.6
$(CP) checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
$(CHMOD) 644 $(DESTDIR)$(mandir)/man6/checkers.6
$(CP) sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6
$(CHMOD) 644 $(DESTDIR)$(mandir)/man6/sudoku.6
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/cat6
$(INSTALL_MAN) blocks.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(INSTALL_MAN) checkers.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
$(INSTALL_MAN) sudoku.$(CAT6EXT) $(DESTDIR)$(mandir)/cat6
-$(INSTALL_DIR) $(DESTDIR)$(mandir)/man6
$(INSTALL_MAN) blocks.man $(DESTDIR)$(mandir)/man6/blocks.6
$(INSTALL_MAN) checkers.man $(DESTDIR)$(mandir)/man6/checkers.6
$(INSTALL_MAN) sudoku.man $(DESTDIR)$(mandir)/man6/sudoku.6


uninstall:
Expand All @@ -292,7 +281,7 @@ uninstall-linux uninstall-osx:
fltk.d/index.html: $(HTMLFILES) $(IMAGEFILES)
echo "Generating HTML documentation..."
-$(RMDIR) fltk.d
-$(MKDIR) fltk.d
-$(INSTALL_DIR) fltk.d
-$(HTMLDOC) --verbose --batch fltk.book -d fltk.d -t html

fltk.ps: $(HTMLFILES) $(IMAGEFILES)
Expand Down
39 changes: 17 additions & 22 deletions fluid/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# FLUID makefile for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2006 by Bill Spitzak and others.
# Copyright 1998-2007 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
Expand Down Expand Up @@ -58,14 +58,12 @@ fluid$(EXEEXT): $(OBJECTS) ../lib/$(LIBNAME) ../lib/$(FLLIBNAME) \
../lib/$(IMGLIBNAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKFLTKFORMS) $(LINKFLTKIMG) $(LDLIBS)
$(POSTBUILD) $@ ../FL/mac.r
$(CP) $@ fluid.app/Contents/MacOS

fluid-shared$(EXEEXT): $(OBJECTS) ../src/$(DSONAME) ../src/$(FLDSONAME) \
../src/$(IMGDSONAME)
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LINKSHARED) $(LDLIBS)
$(POSTBUILD) $@ ../FL/mac.r

clean:
-$(RM) *.o core.* *~ *.bck *.bck
Expand All @@ -80,35 +78,32 @@ include makedepend

install: all
echo "Installing FLUID in $(DESTDIR)$(bindir)..."
-$(MKDIR) $(DESTDIR)$(bindir)
$(CP) $(FLUID) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
$(STRIP) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
$(DESTDIR)$(bindir)/fltk-config --post $(DESTDIR)$(bindir)/fluid$(EXEEXT)
$(CHMOD) 755 $(DESTDIR)$(bindir)/fluid$(EXEEXT)
-$(INSTALL_DIR) $(DESTDIR)$(bindir)
$(INSTALL_BIN) $(FLUID) $(DESTDIR)$(bindir)/fluid$(EXEEXT)

install-linux:
-$(MKDIR) $(DESTDIR)/usr/share/applnk/Development
$(CP) fluid.desktop $(DESTDIR)/usr/share/applnk/Development
-$(INSTALL_DIR) $(DESTDIR)/usr/share/applnk/Development
$(INSTALL_DATA) fluid.desktop $(DESTDIR)/usr/share/applnk/Development
for size in 16 32 48 64 128; do \
if test ! -d $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; then \
$(MKDIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
$(INSTALL_DIR) $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps; \
fi; \
$(CP) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
$(INSTALL_DATA) icons/fluid-$$size.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/fluid.png; \
done
-$(MKDIR) $(DESTDIR)/usr/share/mimelnk/application
$(CP) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application
-$(INSTALL_DIR) $(DESTDIR)/usr/share/mimelnk/application
$(INSTALL_DATA) x-fluid.desktop $(DESTDIR)/usr/share/mimelnk/application

install-osx:
echo Installing Fluid in $(DESTDIR)/Applications...
-$(MKDIR) $(DESTDIR)/Applications/fluid.app
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents
$(CP) fluid.app/Contents/Info.plist $(DESTDIR)/Applications/fluid.app/Contents/Info.plist
$(CP) fluid.app/Contents/PkgInfo $(DESTDIR)/Applications/fluid.app/Contents/PkgInfo
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/MacOS
-$(RM) $(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid
-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app
-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app/Contents
$(INSTALL_DATA) fluid.app/Contents/Info.plist $(DESTDIR)/Applications/fluid.app/Contents/Info.plist
$(INSTALL_DATA) fluid.app/Contents/PkgInfo $(DESTDIR)/Applications/fluid.app/Contents/PkgInfo
-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app/Contents/MacOS
$(RM) $(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid
$(LN) $(bindir)/fluid $(DESTDIR)/Applications/fluid.app/Contents/MacOS/fluid
-$(MKDIR) $(DESTDIR)/Applications/fluid.app/Contents/Resources
$(CP) fluid.app/Contents/Resources/fluid.icns $(DESTDIR)/Applications/fluid.app/Contents/Resources
-$(INSTALL_DIR) $(DESTDIR)/Applications/fluid.app/Contents/Resources
$(INSTALL_DATA) fluid.app/Contents/Resources/fluid.icns $(DESTDIR)/Applications/fluid.app/Contents/Resources

uninstall:
$(RM) $(DESTDIR)$(bindir)/fluid$(EXEEXT)
Expand Down
18 changes: 10 additions & 8 deletions jpeg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,17 @@ clean:
# Install everything...
#

install:
echo "Installing libfltk_jpeg$(LIBEXT) in $(libdir)..."
-$(MKDIR) $(libdir)
$(RM) $(libdir)/libfltk_jpeg$(LIBEXT)
$(CP) $(LIBJPEG) $(libdir)
$(RANLIB) $(libdir)/libfltk_jpeg$(LIBEXT)
install: $(LIBJPEG)
echo "Installing $(LIBJPEG) in $(libdir)..."
-$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_LIB) $(LIBJPEG) $(DESTDIR)$(libdir)
$(RANLIB) $(DESTDIR)$(libdir)/libfltk_jpeg$(LIBEXT)
echo "Installing jpeg headers in $(includedir)/FL/images..."
-$(MKDIR) $(includedir)/FL/images
$(CP) jconfig.h jerror.h jmorecfg.h jpeglib.h $(includedir)/FL/images
-$(INSTALL_DIR) $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jconfig.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jerror.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jmorecfg.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) jpeglib.h $(DESTDIR)$(includedir)/FL/images


#
Expand Down
21 changes: 13 additions & 8 deletions makeinclude.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Make include file for the Fast Light Tool Kit (FLTK).
#
# Copyright 1998-2006 by Bill Spitzak and others.
# Copyright 1998-2007 by Bill Spitzak and others.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
Expand Down Expand Up @@ -37,11 +37,9 @@ docdir = $(datadir)/doc/fltk
VPATH = @srcdir@

# programs we use...
CHMOD = chmod
CP = cp
HTMLDOC = @HTMLDOC@
INSTALL = @INSTALL@
LN = ln -s
MKDIR = mkdir -p
NROFF = @NROFF@
RM = rm -f
RMDIR = rm -rf
Expand Down Expand Up @@ -101,14 +99,22 @@ THREADS = @THREADS@
# Name of FLUID executable we install
FLUID = @FLUID@$(EXEEXT)

# Possible steps after linking...
POSTBUILD = @POSTBUILD@

# Man page extensions...
CAT1EXT = @CAT1EXT@
CAT3EXT = @CAT3EXT@
CAT6EXT = @CAT6EXT@

#
# Installation programs...
#

INSTALL_BIN = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(INSTALL) -d
INSTALL_LIB = $(INSTALL) -m 755
INSTALL_MAN = $(INSTALL) -m 644
INSTALL_SCRIPT = $(INSTALL) -m 755

# Additional GUI install/uninstall targets...
INSTALL_DESKTOP = @INSTALL_DESKTOP@
UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
Expand All @@ -122,7 +128,6 @@ UNINSTALL_DESKTOP = @UNINSTALL_DESKTOP@
.o$(EXEEXT):
echo Linking $@...
$(CXX) $(ARCHFLAGS) $(LDFLAGS) $< $(LINKFLTK) $(LDLIBS) -o $@
$(POSTBUILD) $@ ../FL/mac.r

.c.o:
echo Compiling $<...
Expand Down
20 changes: 10 additions & 10 deletions png/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# PNG library makefile for the Fast Light Toolkit (FLTK).
#
# Copyright 1997-2005 by Easy Software Products.
# Copyright 1997-2007 by Easy Software Products.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
Expand Down Expand Up @@ -58,13 +58,13 @@ clean:

install: $(LIBPNG)
echo "Installing libfltk_png$(LIBEXT) in $(libdir)..."
-$(MKDIR) $(libdir)
$(RM) $(libdir)/libfltk_png$(LIBEXT)
$(CP) $(LIBPNG) $(libdir)
$(RANLIB) $(libdir)/libfltk_png$(LIBEXT)
-$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_LIB) libfltk_png$(LIBEXT) $(DESTDIR)$(libdir)
$(RANLIB) $(DESTDIR)$(libdir)/libfltk_png$(LIBEXT)
echo "Installing png headers in $(includedir)/FL/images..."
-$(MKDIR) $(includedir)/FL/images
$(CP) png.h pngconf.h $(includedir)/FL/images
-$(INSTALL_DIR) $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) png.h $(DESTDIR)$(includedir)/FL/images
$(INSTALL_DATA) pngconf.h $(DESTDIR)$(includedir)/FL/images


#
Expand All @@ -73,10 +73,10 @@ install: $(LIBPNG)

uninstall:
echo "Uninstalling libfltk_png$(LIBEXT) in $(libdir)..."
$(RM) $(libdir)/libfltk_png$(LIBEXT)
$(RM) $(DESTDIR)$(libdir)/libfltk_png$(LIBEXT)
echo "Uninstalling png headers in $(includedir)/FL/images..."
$(RM) $(includedir)/FL/images/png.h
$(RM) $(includedir)/FL/images/pngconf.h
$(RM) $(DESTDIR)$(includedir)/FL/images/png.h
$(RM) $(DESTDIR)$(includedir)/FL/images/pngconf.h


#
Expand Down
Loading

0 comments on commit 44b2ff3

Please sign in to comment.