X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2FMakefile.in;h=563e9028ed356a17f4c1d829f3775f17fc5dd08f;hb=a94197e76a5dea5cb60542840809d6c20d0abbf3;hp=c71601427b3f0075d32efe21bff185592668c855;hpb=585e1a6717d1dd9b90fbb53acaaae82106354d33;p=xscreensaver diff --git a/driver/Makefile.in b/driver/Makefile.in index c7160142..563e9028 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -17,16 +17,21 @@ man1dir = $(mandir)/man1 mansuffix = 1 GNOME_DATADIR = @GNOME_DATADIR@ -GNOME_CCDIR = $(GNOME_DATADIR)/control-center/Desktop +GNOME_CCDIR_1 = $(GNOME_DATADIR)/control-center/Desktop +GNOME_CCDIR_2 = $(GNOME_DATADIR)/control-center/capplets GNOME_PANELDIR = $(GNOME_DATADIR)/gnome/apps/Settings/Desktop GNOME_ICONDIR = $(GNOME_DATADIR)/pixmaps GNOME_BINDIR = $(bindir) +HACK_CONF_DIR = @HACK_CONF_DIR@ CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ DEFS = @DEFS@ -DEFS2 = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"' +SUBP_DEFS = $(DEFS) -DDEFAULT_PATH_PREFIX='"@HACKDIR@"' +GTK_DEFS = $(DEFS) -DDEFAULT_ICONDIR='"$(GNOME_ICONDIR)"' +CONF_DEFS = -DHACK_CONFIGURATION_PATH='"$(HACK_CONF_DIR)"' + LIBS = @LIBS@ PERL = @PERL@ @@ -76,8 +81,10 @@ INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@ MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o -GTK_SRCS = demo-Gtk.c demo-Gtk-widgets.c -GTK_OBJS = demo-Gtk.o demo-Gtk-widgets.o +GTK_SRCS = demo-Gtk.c demo-Gtk-conf.c \ + demo-Gtk-widgets.c demo-Gtk-support.c +GTK_OBJS = demo-Gtk.o demo-Gtk-conf.o \ + demo-Gtk-widgets.o demo-Gtk-support.o PWENT_SRCS = passwd-pwent.c PWENT_OBJS = passwd-pwent.o @@ -100,6 +107,7 @@ TEST_EXES = test-passwd test-uid test-xdpms test-grab \ MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@ $(XMU_LIBS) GTK_LIBS = @GTK_LIBS@ $(XMU_LIBS) +XML_LIBS = @XML_LIBS@ XDPMS_LIBS = @XDPMS_LIBS@ @@ -117,7 +125,10 @@ GL_SRCS = @SAVER_GL_SRCS@ GL_OBJS = @SAVER_GL_OBJS@ GL_LIBS = @SAVER_GL_LIBS@ -LOGO = $(UTILS_SRC)/logo-50.xpm +ICON_SRC = $(UTILS_SRC)/images +LOGO = $(ICON_SRC)/logo-50.xpm +GNOME_ICONS = $(ICON_SRC)/screensaver-*.xpm + DEMO_UTIL_SRCS = $(UTILS_SRC)/resources.c $(UTILS_SRC)/usleep.c \ $(UTILS_SRC)/visual.c DEMO_UTIL_OBJS = $(UTILS_BIN)/resources.o $(UTILS_BIN)/usleep.o \ @@ -147,9 +158,9 @@ GETIMG_OBJS = $(GETIMG_OBJS_1) \ $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabscreen.o \ $(UTILS_BIN)/logo.o prefs.o $(XMU_OBJS) -SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c \ +SAVER_SRCS_1 = xscreensaver.c windows.c timers.c subprocs.c exec.c \ xset.c splash.c setuid.c stderr.c -SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o \ +SAVER_OBJS_1 = xscreensaver.o windows.o timers.o subprocs.o exec.o \ xset.o splash.o setuid.o stderr.o SAVER_SRCS = $(SAVER_SRCS_1) prefs.c dpms.c $(LOCK_SRCS) \ @@ -163,8 +174,8 @@ CMD_OBJS = remote.o xscreensaver-command.o DEMO_SRCS_1 = prefs.c dpms.c $(XMU_SRCS) DEMO_OBJS_1 = prefs.o dpms.o $(XMU_OBJS) -DEMO_SRCS = prefs.c dpms.c remote.c $(DEMO_UTIL_SRCS) -DEMO_OBJS = prefs.o dpms.o remote.o $(DEMO_UTIL_OBJS) +DEMO_SRCS = prefs.c dpms.c remote.c exec.c $(DEMO_UTIL_SRCS) +DEMO_OBJS = prefs.o dpms.o remote.o exec.o $(DEMO_UTIL_OBJS) SAVER_LIBS = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \ $(XDPMS_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \ @@ -183,7 +194,8 @@ EXES2 = @ALL_DEMO_PROGRAMS@ SCRIPTS = xscreensaver-getimage-file xscreensaver-getimage-video HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \ - demo-Gtk-widgets.h demo-Gtk-stubs.h + demo-Gtk-widgets.h demo-Gtk-stubs.h demo-Gtk-support.h \ + demo-Gtk-conf.h MEN = xscreensaver.man xscreensaver-demo.man \ xscreensaver-command.man \ xscreensaver-getimage.man \ @@ -245,10 +257,16 @@ install-program: $(EXES) fi ; \ echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \ $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver + @echo $(INSTALL_PROGRAM) xscreensaver-command \ + $(install_prefix)$(bindir)/xscreensaver-command ; \ $(INSTALL_PROGRAM) xscreensaver-command \ $(install_prefix)$(bindir)/xscreensaver-command + @echo $(INSTALL_PROGRAM) xscreensaver-demo \ + $(install_prefix)$(bindir)/xscreensaver-demo ; \ $(INSTALL_PROGRAM) xscreensaver-demo \ $(install_prefix)$(bindir)/xscreensaver-demo + @echo $(INSTALL_PROGRAM) xscreensaver-getimage \ + $(install_prefix)$(bindir)/xscreensaver-getimage ; \ $(INSTALL_PROGRAM) xscreensaver-getimage \ $(install_prefix)$(bindir)/xscreensaver-getimage @@ -301,6 +319,7 @@ install-scripts: $(SCRIPTS) munge-scripts munge-scripts: $(SCRIPTS) @tmp=/tmp/mf.$$$$ ; \ perl="${PERL}" ; \ + rm -f $$tmp ; \ for program in $(SCRIPTS); do \ echo "adjusting location of perl in $$program..." ; \ sed "s@^\(#!\)\(/[^ ]*/perl[^ ]*\)\(.*\)\$$@\1$$perl\3@" \ @@ -310,7 +329,8 @@ munge-scripts: $(SCRIPTS) else \ cat $$tmp > ./$$program ; \ fi ; \ - done + done ; \ + rm -f $$tmp install-man: $(MEN) @men="$(MEN)" ; \ @@ -406,23 +426,36 @@ install-pam: fi install-gnome:: screensaver-properties.desktop - @lost1="" ;\ - lost2="" ;\ + @lost="" ;\ if [ "$(GNOME_DATADIR)" != "" ]; then \ \ - if [ ! -d "$(install_prefix)$(GNOME_CCDIR)" ]; then \ - echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\ - $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR)" ;\ + if [ ! -d "$(install_prefix)$(GNOME_CCDIR_1)" ]; then \ + echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\ + $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_1)" ;\ + fi ;\ + if [ ! -d "$(install_prefix)$(GNOME_CCDIR_2)" ]; then \ + echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\ + $(INSTALL_DIRS) "$(install_prefix)$(GNOME_CCDIR_2)" ;\ + fi ;\ + \ + echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \ + $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\ + \ + if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \ + $(install_prefix)$(GNOME_CCDIR_1)/screensaver-properties.desktop;\ + then true ;\ + else \ + lost="$$lost $(install_prefix)$(GNOME_CCDIR_1)" ;\ fi ;\ \ echo $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \ - $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\ + $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop ;\ \ if $(INSTALL_DATA) $(srcdir)/screensaver-properties.desktop \ - $(install_prefix)$(GNOME_CCDIR)/screensaver-properties.desktop ;\ + $(install_prefix)$(GNOME_CCDIR_2)/screensaver.desktop ;\ then true ;\ else \ - lost1="$(install_prefix)$(GNOME_CCDIR)" ;\ + lost="$$lost $(install_prefix)$(GNOME_CCDIR_2)" ;\ fi ;\ \ if [ ! -d "$(install_prefix)$(GNOME_PANELDIR)" ]; then \ @@ -436,26 +469,18 @@ install-gnome:: screensaver-properties.desktop $(install_prefix)$(GNOME_PANELDIR)/screensaver-properties.desktop ;\ then true ;\ else \ - lost2="$(install_prefix)$(GNOME_PANELDIR)" ;\ + lost="$$lost $(install_prefix)$(GNOME_PANELDIR)" ;\ fi ;\ \ - if [ "$$lost1" != "" -o "$$lost2" != "" ]; then \ + if [ "$$lost" != "" ]; then \ e=echo ; \ $$e "" ;\ $$e " ####################################################################";\ - $$e " Warning: unable to install screensaver-properties.desktop into" ;\ - plurality="this file" ;\ - if [ "$$lost1" != "" -a "$$lost2" != "" ]; then \ - $$e " $$lost1/ or into" ;\ - $$e " $$lost2/." ;\ - plurality="these files" ;\ - elif [ "$$lost1" != "" ]; then \ - $$e " $$lost1/." ;\ - else \ - $$e " $$lost2/." ;\ - fi ;\ - $$e " Without $$plurality," 'the "Screen Saver" section of the' ;\ - $$e " Gnome Control Center (gnomecc) will not work properly." ;\ + $$e " Warning: unable to install screensaver-properties.desktop into:" ;\ + set - $$lost ;\ + for f in $$@ ; do echo " $$f/" ; done ;\ + $$e ' This means the "Screen Saver" section of the Gnome' ;\ + $$e " Control Center (gnomecc) may not work properly." ;\ $$e " ####################################################################";\ $$e "" ;\ exit 1 ; \ @@ -488,6 +513,7 @@ install-gnome:: screensaver-properties-capplet fi ; \ fi +# xscreensaver.xpm install-gnome:: $(LOGO) @if [ "$(GNOME_DATADIR)" != "" ]; then \ if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \ @@ -501,6 +527,23 @@ install-gnome:: $(LOGO) $(install_prefix)$(GNOME_ICONDIR)/$$target ;\ fi +# ../utils/images/screensaver-*.xpm +install-gnome:: + @if [ "$(GNOME_DATADIR)" != "" ]; then \ + if [ ! -d "$(install_prefix)$(GNOME_ICONDIR)" ]; then \ + echo $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\ + $(INSTALL_DIRS) "$(install_prefix)$(GNOME_ICONDIR)" ;\ + fi ;\ + for target in $(GNOME_ICONS) ; do \ + dest=`echo $$target | sed 's@^.*/@@'` ;\ + echo $(INSTALL_DATA) $$target \ + $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\ + $(INSTALL_DATA) $$target \ + $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\ + done ;\ + fi + +# screensaver-properties.desktop uninstall-gnome:: @if [ "$(GNOME_DATADIR)" != "" ]; then \ f=screensaver-properties.desktop ;\ @@ -510,6 +553,7 @@ uninstall-gnome:: rm -f $(install_prefix)$(GNOME_PANELDIR)/$$f ;\ fi +# screensaver-properties-capplet uninstall-gnome:: @if [ "$(GNOME_DATADIR)" != "" ]; then \ program=screensaver-properties-capplet ;\ @@ -517,6 +561,7 @@ uninstall-gnome:: rm -f $(install_prefix)$(bindir)/$$program ;\ fi +# xscreensaver.xpm uninstall-gnome:: @if [ "$(GNOME_DATADIR)" != "" ]; then \ target=xscreensaver.xpm ;\ @@ -524,6 +569,16 @@ uninstall-gnome:: rm -f $(install_prefix)$(GNOME_ICONDIR)/$$target ;\ fi +# xscreensaver.xpm +uninstall-gnome:: + @if [ "$(GNOME_DATADIR)" != "" ]; then \ + for target in $(GNOME_ICONS) ; do \ + dest=`echo $$target | sed 's@^.*/@@'` ;\ + echo rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\ + rm -f $(install_prefix)$(GNOME_ICONDIR)/$$dest ;\ + done ;\ + fi + install-kde: @src="$(srcdir)/xscreensaver.kss" ; \ if [ "$$KDEDIR" != "" ]; then \ @@ -599,22 +654,25 @@ distdepend: update_ad_version update_man_version XScreenSaver_ad.h # Updates the version number in the app-defaults file to be in sync with # the version number in version.h. This is so people can tell when they # have a version skew between the app-defaults file and the executable. +# Also update hacks/config/README in the same way. update_ad_version:: - @S=XScreenSaver.ad.in ; \ + @files="XScreenSaver.ad.in ../hacks/config/README" ; \ U=$(UTILS_SRC)/version.h ; \ V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \ D=`date '+%d-%b-%Y'` ; \ - echo -n "Updating version number in $$S to $$V $$D... " ; \ - T=/tmp/xs.$$$$ ; \ - sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \ - -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \ - < $$S > $$T ; \ - if cmp -s $$S $$T ; then \ - echo "unchanged." ; \ - else \ - cat $$T > $$S ; \ - echo "done." ; \ - fi ; \ + for S in $$files ; do \ + echo -n "Updating version number in $$S to $$V $$D... " ; \ + T=/tmp/xs.$$$$ ; \ + sed -e "s/\(.*version \)[0-9][0-9]*\.[0-9]*\(.*\)/\1$$V\2/" \ + -e "s/\([0-9][0-9]-[A-Z][a-z][a-z]-[0-9][0-9][0-9]*\)/$$D/" \ + < $$S > $$T ; \ + if cmp -s $$S $$T ; then \ + echo "unchanged." ; \ + else \ + cat $$T > $$S ; \ + echo "done." ; \ + fi ; \ + done ; \ rm $$T update_man_version:: @@ -666,11 +724,22 @@ $(SAVER_UTIL_OBJS): .c.o: $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< -# subprocs is the only one that takes an extra -D option. +# subprocs takes an extra -D option. subprocs.o: subprocs.c - $(CC) -c $(INCLUDES) $(DEFS2) $(CFLAGS) $(X_CFLAGS) \ + $(CC) -c $(INCLUDES) $(SUBP_DEFS) $(CFLAGS) $(X_CFLAGS) \ $(srcdir)/subprocs.c +# demo-Gtk takes an extra -D option, and an extra -I option. +demo-Gtk.o: demo-Gtk.c + $(CC) -c $(INCLUDES) $(SUBP_DEFS) -I$(ICON_SRC) $(GTK_DEFS) \ + $(CFLAGS) $(X_CFLAGS) \ + $(srcdir)/demo-Gtk.c + +# demo-Gtk-conf takes an extra -D option. +demo-Gtk-conf.o: demo-Gtk-conf.c + $(CC) -c $(INCLUDES) $(CONF_DEFS) $(GTK_DEFS) $(CFLAGS) $(X_CFLAGS) \ + $(srcdir)/demo-Gtk-conf.c + # How we build the default app-defaults file into the program. # @@ -693,7 +762,7 @@ xscreensaver-command: $(CMD_OBJS) xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@ - cp -p @PREFERRED_DEMO_PROGRAM@ $@ + $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@ xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS) $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \ @@ -702,7 +771,7 @@ xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS) xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS) $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \ - $(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \ + $(GTK_LIBS) $(XML_LIBS) $(X_PRE_LIBS) -lXt -lX11 $(XDPMS_LIBS) -lXext \ $(X_EXTRA_LIBS) xscreensaver-getimage: $(GETIMG_OBJS) @@ -731,7 +800,7 @@ test-apm: test-apm.o $(CC) $(LDFLAGS) -o $@ test-apm.o $(SAVER_LIBS) -lapm TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS) -test-fade: test-fade.o +test-fade: test-fade.o $(UTILS_BIN)/fade.o $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS) @@ -763,6 +832,7 @@ timers.o: $(srcdir)/prefs.h subprocs.o: ../config.h subprocs.o: $(srcdir)/xscreensaver.h subprocs.o: $(srcdir)/prefs.h +exec.o: ../config.h xset.o: ../config.h xset.o: $(srcdir)/xscreensaver.h xset.o: $(srcdir)/prefs.h @@ -784,10 +854,17 @@ demo-Gtk.o: ../config.h demo-Gtk.o: $(srcdir)/prefs.h demo-Gtk.o: $(srcdir)/remote.h demo-Gtk.o: $(srcdir)/demo-Gtk-widgets.h +demo-Gtk.o: $(srcdir)/demo-Gtk-support.h +demo-Gtk.o: $(srcdir)/demo-Gtk-conf.h demo-Gtk.o: XScreenSaver_ad.h +demo-Gtk-conf.o: ../config.h +demo-Gtk-conf.o: $(srcdir)/demo-Gtk-conf.h demo-Gtk-widgets.o: ../config.h demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h +demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-support.h +demo-Gtk-support.o: ../config.h +demo-Gtk-support.o: $(srcdir)/demo-Gtk-support.h xscreensaver-getimage.o: ../config.h xscreensaver-getimage.o: $(srcdir)/prefs.h xscreensaver-getimage.o: XScreenSaver_ad.h