]> diplodocus.org Git - nmh/blobdiff - Makefile.in
Quoted argument to AC_LINK_IFELSE to silence authoheader warnings.
[nmh] / Makefile.in
index 598173ff5e9742afa83702ce174b90249b4def6f..d83cff3a0c4cfb46051aa96879c165a5944b85f6 100644 (file)
@@ -10,6 +10,7 @@ SHELL = /bin/sh
 
 srcdir = @srcdir@
 abs_srcdir = @abs_srcdir@
+datarootdir = @datarootdir@
 VPATH  = @srcdir@
 
 # ========== USER CONFIGURATION SECTION ==========
@@ -200,18 +201,15 @@ nmhrelease:
        cd $(ftpdir) && ln -s $(tarfile) nmh.tar.gz
        cd $(ftpdir) && md5sum *.gz > MD5SUM
 
-# Create binary and source RPMs.  Assumes that configure had already
-# been run.  Otherwise, there wouldn't be a Makefile.
+# Create binary and source RPMs.
 # _topdir is the specified RPM build root.
 # _tmppath is TMP below _topdir.
-# srcdir is the top level nmh source directory.
-# tarfile and version are as specified in this file.  rpmbuild does
-#   not allow Version to contain any dashes.
-rpm: all nmhdist
+rpm: nmhdist
+       @test -d $(rpmdir)/SOURCES  ||  mkdir -p $(rpmdir)/SOURCES
+       @test -d $(rpmdir)/SPECS  ||  mkdir -p $(rpmdir)/SPECS
+       @mv -f $(tarfile) $(rpmdir)/SOURCES
+       @cp -p VERSION $(rpmdir)/SOURCES
+       @cp -p nmh.spec $(rpmdir)/SPECS
        @rpmbuild --define '_topdir $(rpmdir)' \
           --define '_tmppath %{_topdir}/TMP' \
-          --define 'srcdir $(abs_srcdir)' \
-          --define 'tarfile $(tarfile)' \
-          --define 'version '`echo $(VERSION) | sed "s/-/_/g"` \
-          -ba nmh.spec
-       @$(RM) $(tarfile)
+          -ba $(rpmdir)/SPECS/nmh.spec