aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am19
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 1ab58bf..364c5bb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,8 +9,15 @@ pkg_gdata = \
rpmrc \
macros
+pkg_sysconf_macros_tmp = \
+ build.macros
+
pkg_data_in = $(pkg_gdata:=.in)
+pkg_sysconf_macros_in = $(pkg_sysconf_macros_tmp:=.in)
+
+pkg_sysconf_macros = $(pkg_sysconf_macros_tmp)
+
pkg_gconfig = \
platform \
$(if $(CANONTARGETCPU32), platform32, )
@@ -64,6 +71,7 @@ pkglib_SCRIPTS = \
EXTRA_DIST = \
$(pkg_data) \
$(pkg_data_in) \
+ $(pkg_sysconf_macros_in) \
$(pkg_scripts) \
$(pkg_scripts_in) \
macros-perarch.in make_arch_macrosfiles.sh.in \
@@ -86,7 +94,7 @@ edit = sed \
%: %.in Makefile
$(edit) $< > $@
-%.macros: macros-perarch make_arch_macrosfiles.sh
+$(arch_macrosfiles): macros-perarch make_arch_macrosfiles.sh
arch=`echo $@ | sed 's,\\.macros,,'`; \
sh ./make_arch_macrosfiles.sh macros-perarch $$arch > $@
@@ -96,7 +104,7 @@ platform: rpmgenplatform Makefile
platform32: rpmgenplatform Makefile
perl rpmgenplatform $(CANONTARGETCPU32) > $@
-install-data-local: $(arch_macrosfiles) $(pkg_gconfig)
+install-data-local: $(arch_macrosfiles) $(pkg_gconfig) $(pkg_sysconf_macros_tmp)
if ONLY_RPMRC
echo "not installing per-arch macros which are already in rpmrc and standard rpm per-arch macros"
else
@@ -105,8 +113,11 @@ else
$(install_sh_DATA) $${i}.macros $(DESTDIR)$(RPMVENDORDIR)/$${i}-$(RPMOS)/macros; \
done
endif
- [ -d $(DESTDIR)$(RPMSYSCONFDIR) ] || $(mkinstalldirs) $(DESTDIR)$(RPMSYSCONFDIR)
+ [ -d $(DESTDIR)$(RPMSYSCONFDIR)/macros.d ] || $(mkinstalldirs) $(DESTDIR)$(RPMSYSCONFDIR)/macros.d
$(install_sh_SCRIPT) rpmb_deprecated $(DESTDIR)$(RPMLIBDIR)
+ for i in $(pkg_sysconf_macros); do \
+ $(install_sh_DATA) $${i} $(DESTDIR)$(RPMSYSCONFDIR)/macros.d/$${i}; \
+ done
if RPMPLATFORM
for i in $(pkg_gconfig); do \
$(install_sh_DATA) $${i} $(DESTDIR)$(RPMSYSCONFDIR)/$${i}; \
@@ -124,5 +135,5 @@ test: $(pkg_gdata) $(pkg_gscripts) $(arch_macrosfiles) $(pkg_gconfig)
sh tests.sh
CLEANFILES = $(pkg_gdata) $(pkg_gscripts) $(arch_macrosfiles) $(pkg_gconfig)\
- macros-perarch \
+ macros-perarch $(pkg_sysconf_macros_tmp) \
make_arch_macrosfiles.sh