Search
lxdream.org :: lxdream/Makefile.am
lxdream 0.9.1
released Jun 29
Download Now
filename Makefile.am
changeset 1061:06ea56ae747f
prev1053:7a9a5eef34ac
next1170:9ffc8295b414
author nkeynes
date Mon Jun 29 09:25:11 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Add code to the makefile to construct the .dmg images. Apparently it _can_ be done after all
file annotate diff log raw
nkeynes@1
     1
## Process this file with automake to produce Makefile.in
nkeynes@1
     2
nkeynes@700
     3
POD2MAN=@POD2MAN@
nkeynes@717
     4
BUNDLE=lxdream.app
nkeynes@1061
     5
DMGFILE=lxdream-$(VERSION)-$(host_cpu).dmg
nkeynes@1061
     6
DMGLABEL=Lxdream-$(VERSION)-$(host_cpu)
nkeynes@700
     7
nkeynes@521
     8
if BUILD_SYSTEST
nkeynes@521
     9
  TEST_SUBDIR = test
nkeynes@521
    10
endif
nkeynes@521
    11
SUBDIRS = src po $(TEST_SUBDIR)
nkeynes@1
    12
nkeynes@1017
    13
EXTRA_DIST = autogen.sh lxdream.pod lxdream.desktop bundlelibs.pl
nkeynes@1
    14
nkeynes@747
    15
dist_sysconf_DATA = lxdreamrc
nkeynes@749
    16
CLEANFILES = lxdream.1
nkeynes@700
    17
man_MANS = lxdream.1
nkeynes@700
    18
nkeynes@700
    19
lxdream.1: lxdream.pod
nkeynes@700
    20
	$(POD2MAN) $< $@
nkeynes@700
    21
nkeynes@1
    22
install-data-local:
nkeynes@1
    23
	@$(NORMAL_INSTALL)
nkeynes@1
    24
	if test -d $(srcdir)/pixmaps; then \
nkeynes@1
    25
	  $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
nkeynes@900
    26
	  for pixmap in $(srcdir)/pixmaps/*.png $(srcdir)/pixmaps/*.gif; do \
nkeynes@1
    27
	    if test -f $$pixmap; then \
nkeynes@1
    28
	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \
nkeynes@1
    29
	    fi \
nkeynes@1
    30
	  done \
nkeynes@1
    31
	fi
nkeynes@1053
    32
	$(mkinstalldirs) $(DESTDIR)$(datadir)/applications
nkeynes@1017
    33
	$(INSTALL_DATA) $(srcdir)/lxdream.desktop $(DESTDIR)$(datadir)/applications
nkeynes@1017
    34
	$(INSTALL_DATA) $(srcdir)/pixmaps/lxdream.png $(DESTDIR)$(datadir)/pixmaps
nkeynes@517
    35
	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
nkeynes@1
    36
nkeynes@748
    37
uninstall-local:
nkeynes@748
    38
	@$(NORMAL_UNINSTALL) 
nkeynes@1017
    39
	rm -rf $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE)
nkeynes@1017
    40
	rm -f $(DESTDIR)$(datadir)/pixmaps/lxdream.png
nkeynes@1017
    41
	rm -f $(DESTDIR)$(datadir)/applications/lxdream.desktop
nkeynes@749
    42
nkeynes@749
    43
clean-local:
nkeynes@749
    44
	rm -rf $(BUNDLE)
nkeynes@748
    45
               
nkeynes@1
    46
dist-hook:
nkeynes@731
    47
	if test -d $(srcdir)/pixmaps; then \
nkeynes@1
    48
	  mkdir $(distdir)/pixmaps; \
nkeynes@731
    49
	  for pixmap in $(srcdir)/pixmaps/*; do \
nkeynes@1
    50
	    if test -f $$pixmap; then \
nkeynes@1
    51
	      cp -p $$pixmap $(distdir)/pixmaps; \
nkeynes@1
    52
	    fi \
nkeynes@1
    53
	  done \
nkeynes@1
    54
	fi
nkeynes@752
    55
	if test -d $(srcdir)/debian; then \
nkeynes@752
    56
	  mkdir $(distdir)/debian; \
nkeynes@752
    57
	  for f in $(srcdir)/debian/*; do \
nkeynes@752
    58
	    if test -f $$f; then \
nkeynes@752
    59
	      cp -p $$f $(distdir)/debian; \
nkeynes@752
    60
	    fi \
nkeynes@752
    61
	  done \
nkeynes@752
    62
	fi
nkeynes@1
    63
nkeynes@692
    64
if GUI_COCOA
nkeynes@681
    65
# Build a Mac OS X bundle. This is meaningless anywhere else
nkeynes@692
    66
all-local:
nkeynes@692
    67
	@echo --- Building Mac Bundle ---
nkeynes@717
    68
	rm -rf $(BUNDLE)
nkeynes@717
    69
	mkdir -p $(BUNDLE)/Contents/MacOS
nkeynes@717
    70
	mkdir -p $(BUNDLE)/Contents/Resources
nkeynes@1024
    71
	mkdir -p $(BUNDLE)/Contents/Plugins
nkeynes@778
    72
	cp Info.plist $(BUNDLE)/Contents
nkeynes@894
    73
	cp $(srcdir)/lxdreamrc $(BUNDLE)/Contents/Resources
nkeynes@717
    74
	cp src/lxdream $(BUNDLE)/Contents/MacOS
nkeynes@1024
    75
	cp -R src/*.dylib $(BUNDLE)/Contents/Plugins
nkeynes@731
    76
	cp -R $(srcdir)/pixmaps/* $(BUNDLE)/Contents/Resources
nkeynes@717
    77
	$(srcdir)/bundlelibs.pl $(BUNDLE)/Contents/MacOS/lxdream $(BUNDLE)/Contents/Frameworks
nkeynes@715
    78
	for cat in $(CATALOGS); do \
nkeynes@715
    79
	   catname=`basename "$$cat"`; \
nkeynes@715
    80
	   catname=`echo $$catname|sed -e 's/$(CATOBJEXT)$$//'`; \
nkeynes@717
    81
	   mkdir -p "$(BUNDLE)/Contents/Resources/$$catname/LC_MESSAGES"; \
nkeynes@772
    82
	   cp "$(top_srcdir)/po/$$cat" "$(BUNDLE)/Contents/Resources/$$catname/LC_MESSAGES/lxdream$(INSTOBJEXT)"; \
nkeynes@715
    83
	done
nkeynes@692
    84
	@echo --- Done ---
nkeynes@692
    85
endif
nkeynes@692
    86
nkeynes@1061
    87
# Build a Mac DMG disk image.
nkeynes@1061
    88
dmg: $(BUNDLE)
nkeynes@1061
    89
	@echo --- Building DMG image ---
nkeynes@1061
    90
	hdiutil create -fs HFS+ -size 5m -volname $(DMGLABEL) $(DMGFILE)
nkeynes@1061
    91
	hdiutil attach -mountpoint tmp.mount $(DMGFILE)
nkeynes@1061
    92
	cp -Rdp $(BUNDLE) tmp.mount/
nkeynes@1061
    93
	cp dmg.layout tmp.mount/.DS_Store
nkeynes@1061
    94
	ln -s /Applications tmp.mount/Applications
nkeynes@1061
    95
	hdiutil unmount tmp.mount
nkeynes@1061
    96
	zip -9 $(DMGFILE).zip $(DMGFILE)
nkeynes@1061
    97
	rm $(DMGFILE)
nkeynes@1061
    98
	@echo --- Done ---
nkeynes@1061
    99
nkeynes@692
   100
bundle: all
.