Makefile revision 6643
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova# This program is free software; you can redistribute it and/or modify
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# it under the terms of the GNU General Public License as published by
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# the Free Software Foundation; either version 2 of the License, or
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu# (at your option) any later version.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# This program is distributed in the hope that it will be useful,
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# but WITHOUT ANY WARRANTY; without even the implied warranty of
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# GNU General Public License for more details.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# You should have received a copy of the GNU General Public License
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# along with this program; if not, write to the Free Software
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova#
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaPACKAGE=os-welcome
9f85afecbd79b3df5a0bb17bd28cd0b288dc3213Kristina SojakovaVERSION=1.1.10
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakovatop_builddir=.
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakovatop_srcdir=.
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaSUBDIRS= po
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaDIST_FILES=
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaALL_FILES_BASE= \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova index.html \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(null)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# Let's avoid having multiple copies of images - we could do the same for css at
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova# some stage
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaALL_IMAGES = \
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova html/C/images/ora_info_company.gif \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova html/C/images/ora_solaris.png\
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(null)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaALL_STYLE = \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova html/C/js/1p.js \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova html/C/css/master.css \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova $(null)
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaALL_LINGUAS=C ar ca cs de el es fr it he hu id ja ko nl pl pt_BR ru sv sk zh_CN zh_HK zh_TW
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaALL_FILES= $(foreach ling, $(ALL_LINGUAS), $(addprefix html/$(ling)/, $(ALL_FILES_BASE)))
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaALL_FILES+= html/index.html $(ALL_IMAGES) $(ALL_STYLE)
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina SojakovaDATA= \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova os-about \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova os-next-steps \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova os-about.desktop \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova os-next-steps.desktop
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaDIST_FILES= $(ALL_FILES) \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova Makefile \
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova ChangeLog \
b43458b4d81f7451112cecbd757f3a05216e7088Kristina Sojakova README \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova os-about.py \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova os-about.desktop.in \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova os-next-steps.py \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova os-next-steps.desktop.in \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/next-steps.png \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/about-os-logo.png \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/about-os-window-icon.png \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/about-os-background.jpg \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/personalize.png \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova images/participate.png \
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova images/resources.png \
14650c9e129d8dc51ed55b2edc6ec27d9f0f6d00Kristina Sojakova os-icons-copy.sh \
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova os-icons-copy.desktop
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina Sojakova
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaNEXT_STEPS_DIR = /usr/share/os-about
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaWELCOME_DIR= /usr/share/doc/os-welcome
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaDESKTOP_DIR= /usr/share/applications
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaICON_DIR= /usr/share/pixmaps
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaBIN_DIR = /usr/bin
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaLIB_DIR = /usr/lib/os-welcome
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaDESTDIR=
ccaa75089b23c0f043cdbd4001cba4e076ca4fd3Kristina SojakovaXDG_DIR= /etc/xdg/autostart
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina SojakovaINSTALL=/usr/sbin/install
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina SojakovaINTLTOOL_MERGE=/usr/bin/intltool-merge
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakovadefault: all
d2786879b4733fd4886a5b654f7c6de1d234f638Kristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakovapython_scripts: $(DATA)
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakovaos-about: os-about.py
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova cp $< $@
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakovaos-next-steps: os-next-steps.py
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova cp $< $@
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakovaall: $(DATA)
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova @list='$(SUBDIRS)'; for subdir in $$list; do \
e8dd447a2aa5fbac10668749dfe4142c05ec3d7dKristina Sojakova cd $$subdir && $(MAKE) $@; \
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova done;
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova @echo use make install DESTDIR=/path/to/proto to install to a proto area
5e35940c3516ccea02caa0450d2b075de0106fa5Kristina Sojakova
install: $(DATA)
@list='$(SUBDIRS)'; for subdir in $$list; do \
cd $$subdir && $(MAKE) $@; \
done;
$(INSTALL) -d -m 755 $(DESTDIR)$(WELCOME_DIR)
for f in $(ALL_FILES); do \
dir=`dirname $$f`; \
echo installing $$f in $$dir; \
$(INSTALL) -d -m 755 $(DESTDIR)$(WELCOME_DIR)/$$dir; \
$(INSTALL) -m 644 -f $(DESTDIR)$(WELCOME_DIR)/$$dir $$f; \
done
$(INSTALL) -d -m 755 $(DESTDIR)$(DESKTOP_DIR)
$(INSTALL) -m 644 -f $(DESTDIR)$(DESKTOP_DIR)/$$dir os-about.desktop
$(INSTALL) -m 644 -f $(DESTDIR)$(DESKTOP_DIR)/$$dir os-next-steps.desktop
$(INSTALL) -d -m 755 $(DESTDIR)$(BIN_DIR)
$(INSTALL) -m 755 -f $(DESTDIR)$(BIN_DIR)/$$dir os-about
$(INSTALL) -m 755 -f $(DESTDIR)$(BIN_DIR)/$$dir os-next-steps
$(INSTALL) -d -m 755 $(DESTDIR)$(LIB_DIR)
$(INSTALL) -m 755 -f $(DESTDIR)$(LIB_DIR)/$$dir os-icons-copy.sh
$(INSTALL) -d -m 755 $(DESTDIR)$(XDG_DIR)
$(INSTALL) -m 755 -f $(DESTDIR)$(XDG_DIR)/$$dir os-icons-copy.desktop
$(INSTALL) -d -m 755 $(DESTDIR)$(ICON_DIR)
$(INSTALL) -m 644 -f $(DESTDIR)$(ICON_DIR)/$$dir images/next-steps.png
$(INSTALL) -m 644 -f $(DESTDIR)$(ICON_DIR)/$$dir images/about-os-window-icon.png
$(INSTALL) -d -m 755 $(DESTDIR)$(NEXT_STEPS_DIR)
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/about-os-logo.png
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/about-os-window-icon.png
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/about-os-background.jpg
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/participate.png
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/personalize.png
$(INSTALL) -m 644 -f $(DESTDIR)$(NEXT_STEPS_DIR)/$$dir images/resources.png
uninstall:
for f in $(ALL_FILES); do \
rm -f $(DESTDIR)$(WELCOME_DIR)/$$f; \
done
-test -d $(DESTDIR)$(WELCOME_DIR)/html/css && \
/bin/rmdir -ps $(DESTDIR)$(WELCOME_DIR)/html/css
-test -d $(DESTDIR)$(WELCOME_DIR)/html/js && \
/bin/rmdir -ps $(DESTDIR)$(WELCOME_DIR)/html/js
rm -f $(DESTDIR)$(BIN_DIR)/os-about
rm -f $(DESTDIR)$(BIN_DIR)/os-next-steps
rm -f $(DESTDIR)$(DESKTOP_DIR)/os-about.desktop
rm -f $(DESTDIR)$(DESKTOP_DIR)/os-next-steps.desktop
-/bin/rmdir -ps $(DESTDIR)$(DESKTOP_DIR)
-/bin/rmdir -ps $(DESTDIR)$(BIN_DIR)
clean:
rm os-about.desktop os-next-steps.desktop
rm os-about os-next-steps
distcheck:
@for f in $(DIST_FILES); do \
test -f $$f && continue; \
echo ERROR: $$f not found; \
exit 1; \
done
dist: distcheck
rm -rf $(PACKAGE)-$(VERSION); \
mkdir -p $(PACKAGE)-$(VERSION); \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(PACKAGE)-$(VERSION)/$$subdir" \
|| mkdir -p "$(PACKAGE)-$(VERSION)/$$subdir" \
|| exit 1; \
cd $$subdir && $(MAKE) $@; \
fi; \
done;
for f in $(DIST_FILES); do \
dir=`dirname $$f`; \
echo installing $$f in $$dir; \
$(INSTALL) -d -m 755 $(PACKAGE)-$(VERSION)/$$dir; \
$(INSTALL) -m 644 -f $(PACKAGE)-$(VERSION)/$$dir $$f; \
done ;\
/bin/tar cf - $(PACKAGE)-$(VERSION) | \
bzip2 -9 > $(PACKAGE)-$(VERSION).tar.bz2
rm -rf $(PACKAGE)-$(VERSION)