projects/package-update-indicator

diff Makefile @ 10:adba37525ee5

Notify about required session or system restarts

Follow all PackageKit transactions and indicate when a session or system
restart is required.
Generate enum types with glib-mkenums.
author Guido Berhoerster <guido+pui@berhoerster.name>
date Fri Jul 06 14:12:46 2018 +0200 (2018-07-06)
parents 2477a6151087
children 329aeecdd83a
line diff
     1.1 --- a/Makefile	Tue Jun 19 15:44:36 2018 +0200
     1.2 +++ b/Makefile	Fri Jul 06 14:12:46 2018 +0200
     1.3 @@ -50,6 +50,7 @@
     1.4  SED :=		sed
     1.5  GLIB_COMPILE_SCHEMAS := $(shell pkg-config --variable=glib_compile_schemas gio-2.0)
     1.6  GLIB_COMPILE_RESOURCES := $(shell pkg-config --variable=glib_compile_resources gio-2.0)
     1.7 +GLIB_MKENUMS :=	$(shell pkg-config --variable=glib_mkenums glib-2.0)
     1.8  XSLTPROC :=	xsltproc
     1.9  DOCBOOK5_MANPAGES_STYLESHEET = http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl
    1.10  DOCBOOK5_MANPAGES_FLAGS = --stringparam man.authors.section.enabled 0 \
    1.11 @@ -113,6 +114,14 @@
    1.12  
    1.13  OBJS = $($(PACKAGE)_OBJS) $($(PACKAGE)-prefs_OBJS)
    1.14  
    1.15 +ENUM_DEPS =	pui-backend.h \
    1.16 +		pui-application.h
    1.17 +
    1.18 +ENUM_HEADER =	pui-types.h
    1.19 +
    1.20 +ENUM_FILES =	$(ENUM_HEADER) \
    1.21 +		pui-types.c
    1.22 +
    1.23  GSETTINGS_SCHEMAS = $(APPLICATION_ID).gschema.xml
    1.24  
    1.25  GRESOURCE_FILES = pui-prefs.gresource.xml
    1.26 @@ -176,6 +185,14 @@
    1.27  $(PACKAGE)-prefs: $($(PACKAGE)-prefs_OBJS)
    1.28  	$(LINK.o) $^ $(LDLIBS) -o $@
    1.29  
    1.30 +$(OBJS): $(ENUM_HEADER)
    1.31 +
    1.32 +%-types.h: %-types.h.in $(ENUM_DEPS)
    1.33 +	$(GLIB_MKENUMS) --template $< >$@ $(filter-out $<,$^)
    1.34 +
    1.35 +%-types.c: %-types.c.in $(ENUM_DEPS)
    1.36 +	$(GLIB_MKENUMS) --template $< >$@ $(filter-out $<,$^)
    1.37 +
    1.38  %-resources.c: %.gresource.xml
    1.39  	$(GLIB_COMPILE_RESOURCES) --generate-dependencies $< | \
    1.40  	    while read -r resource_file; do \
    1.41 @@ -231,8 +248,8 @@
    1.42  	done
    1.43  
    1.44  clean:
    1.45 -	rm -f $(PACKAGE) $(OBJS) $(AUTOSTART_FILE) $(DESKTOP_FILES) $(POTFILE) \
    1.46 -	    $(MOFILES) $(MANPAGES)
    1.47 +	rm -f $(PACKAGE) $(OBJS) $(ENUM_FILES) $(AUTOSTART_FILE) \
    1.48 +	    $(DESKTOP_FILES) $(POTFILE) $(MOFILES) $(MANPAGES)
    1.49  
    1.50  clobber: clean
    1.51  	rm -f $(patsubst %.o,%.d,$(OBJS))