[parted-devel] 03-enable-rule--makefile-check

Jim Meyering jim at meyering.net
Wed Feb 28 14:46:22 CET 2007


Use $(VAR), rather than obsolescent @VAR@ automake notation.

From: Jim Meyering <jim at meyering.net>

Enable the makefile-check rule.
* Makefile.cfg: Remove makefile-check from the list of rules to skip.
* Makefile.am: change e.g., @VERSION@ to $(VERSION).
* debug/clearfat/Makefile.am: Likewise.
* libparted/Makefile.am: Likewise.
* libparted/fs/Makefile.am: Likewise.
* libparted/fs/amiga/Makefile.am: Likewise.
* libparted/fs/bfs/Makefile.am: Likewise.
* libparted/fs/ext2/Makefile.am: Likewise.
* libparted/fs/fat/Makefile.am: Likewise.
* libparted/fs/hfs/Makefile.am: Likewise.
* libparted/fs/jfs/Makefile.am: Likewise.
* libparted/fs/linux_swap/Makefile.am: Likewise.
* libparted/fs/ntfs/Makefile.am: Likewise.
* libparted/fs/reiserfs/Makefile.am: Likewise.
* libparted/fs/ufs/Makefile.am: Likewise.
* libparted/fs/xfs/Makefile.am: Likewise.
* libparted/labels/Makefile.am: Likewise.
* libparted/tests/Makefile.am: Likewise.
* parted/Makefile.am: Likewise.
* partprobe/Makefile.am: Likewise.

The above conversion caused a problem:
* libparted/Makefile.am: Remove this recursive definition:
LIBS = @INTLLIBS@ @LIBS at .  Once converted to LIBS = ...$(LIBS),
GNU make would (rightly) fail, objecting to the recursive definition.
(libparted_la_LIBADD): Instead, add $(INTLLIBS) here.
---

 Makefile.am                         |    2 +-
 Makefile.cfg                        |    1 -
 debug/clearfat/Makefile.am          |    4 ++--
 libparted/Makefile.am               |   17 ++++++++---------
 libparted/fs/Makefile.am            |   10 +++++-----
 libparted/fs/amiga/Makefile.am      |    2 +-
 libparted/fs/bfs/Makefile.am        |    2 +-
 libparted/fs/ext2/Makefile.am       |    2 +-
 libparted/fs/fat/Makefile.am        |    2 +-
 libparted/fs/hfs/Makefile.am        |    2 +-
 libparted/fs/jfs/Makefile.am        |    2 +-
 libparted/fs/linux_swap/Makefile.am |    2 +-
 libparted/fs/ntfs/Makefile.am       |    2 +-
 libparted/fs/reiserfs/Makefile.am   |    2 +-
 libparted/fs/ufs/Makefile.am        |    2 +-
 libparted/fs/xfs/Makefile.am        |    2 +-
 libparted/labels/Makefile.am        |    6 +++---
 libparted/tests/Makefile.am         |    4 ++--
 parted/Makefile.am                  |    6 +++---
 partprobe/Makefile.am               |    4 ++--
 20 files changed, 37 insertions(+), 39 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ebb9487..4e792ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -22,7 +22,7 @@ pc_DATA = libparted.pc.in
 # make distcheck target does not like auto-generated files
 # being included in the distributed archive.
 parted.spec: parted.spec.in
-	sed 's/@''PACKAGE@/@PACKAGE@/;s/@''VERSION@/@VERSION@/' $< > $@-tmp
+	sed 's/@''PACKAGE@/$(PACKAGE)/;s/@''VERSION@/$(VERSION)/' $< > $@-tmp
 	mv $@-tmp $@
 MAINTAINERCLEANFILES = parted.spec
 
diff --git a/Makefile.cfg b/Makefile.cfg
index 0daefc6..304fd61 100644
--- a/Makefile.cfg
+++ b/Makefile.cfg
@@ -38,7 +38,6 @@ local-checks-to-skip = \
   changelog-check \
   strftime-check \
   patch-check \
-  makefile-check \
   author_mark_check \
   sc_cast_of_argument_to_free \
   check-AUTHORS
diff --git a/debug/clearfat/Makefile.am b/debug/clearfat/Makefile.am
index 70e1481..0101ceb 100644
--- a/debug/clearfat/Makefile.am
+++ b/debug/clearfat/Makefile.am
@@ -2,12 +2,12 @@ noinst_PROGRAMS	= clearfat
 
 clearfat_SOURCES = clearfat.c
 
-clearfat_LDADD = @LIBS@ @PARTED_LIBS@ \
+clearfat_LDADD = $(LIBS) $(PARTED_LIBS) \
                $(top_builddir)/libparted/libparted.la
 
 
 partedincludedir	= -I$(top_srcdir)/include
 
-INCLUDES 		= $(partedincludedir) @INTLINCS@
+INCLUDES 		= $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/Makefile.am b/libparted/Makefile.am
index 4892c8d..0b013cc 100644
--- a/libparted/Makefile.am
+++ b/libparted/Makefile.am
@@ -11,13 +11,11 @@ endif
 
 SUBDIRS       = labels fs . $(SUBDIRS_CHECK)
 
-LIBS = @INTLLIBS@ @LIBS@
 
 partedincludedir      = -I$(top_srcdir)/lib -I$(top_srcdir)/include
 lib_LTLIBRARIES	      =	libparted.la
 libparted_la_LDFLAGS  = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
 						-release $(LT_RELEASE)
-
 libparted_la_SOURCES  = debug.c			\
 			device.c		\
 			exception.c		\
@@ -30,21 +28,22 @@ libparted_la_SOURCES  = debug.c			\
 			cs/constraint.c		\
 			cs/natmath.c		\
 			arch/blkpg.h		\
-			arch/@OS at .c
+			arch/$(OS).c
 
 EXTRA_libparted_la_SOURCES    = arch/linux.c		\
 				arch/gnu.c \
 				arch/beos.c
 
-libparted_la_LIBADD   = @OS_LIBS@			\
-			@DL_LIBS@			\
-			@DM_LIBS@			\
-			@SELINUX_LIBS@		\
-			fs/libfs.la			\
+libparted_la_LIBADD   = $(OS_LIBS)		\
+			$(DL_LIBS)		\
+			$(DM_LIBS)		\
+			$(SELINUX_LIBS)		\
+			$(INTLLIBS)		\
+			fs/libfs.la		\
 			labels/liblabels.la
 
 EXTRA_DIST	      = mbr.s
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/Makefile.am b/libparted/fs/Makefile.am
index 76a9613..02beda8 100644
--- a/libparted/fs/Makefile.am
+++ b/libparted/fs/Makefile.am
@@ -5,16 +5,16 @@
 
 SUBDIRS       = amiga ext2 ufs fat ntfs hfs linux_swap xfs jfs reiserfs # bfs
 
-LIBS = @INTLLIBS@ @LIBS@
+LIBS = $(INTLLIBS) $(LIBS)
 
 partedincludedir      =	-I$(top_srcdir)/include
 noinst_LTLIBRARIES    =	libfs.la
 libfs_la_LDFLAGS  = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
 			-release $(LT_RELEASE)
 
-libfs_la_LIBADD   = @UUID_LIBS@			\
-		    @OS_LIBS@			\
-		    @REISER_LIBS@		\
+libfs_la_LIBADD   = $(UUID_LIBS)			\
+		    $(OS_LIBS)			\
+		    $(REISER_LIBS)		\
 		    amiga/libamigafs.la		\
 		    ext2/libext2.la		\
 		    ufs/libufs.la		\
@@ -29,6 +29,6 @@ libfs_la_LIBADD   = @UUID_LIBS@			\
 
 libfs_la_SOURCES   = 
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/amiga/Makefile.am b/libparted/fs/amiga/Makefile.am
index 2002891..599fec2 100644
--- a/libparted/fs/amiga/Makefile.am
+++ b/libparted/fs/amiga/Makefile.am
@@ -11,6 +11,6 @@ libamigafs_la_SOURCES   =	amiga.h		\
 			apfs.c		\
 			interface.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/bfs/Makefile.am b/libparted/fs/bfs/Makefile.am
index 8bd73f1..15d3c48 100644
--- a/libparted/fs/bfs/Makefile.am
+++ b/libparted/fs/bfs/Makefile.am
@@ -3,4 +3,4 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= libbfs.la
 libbfs_la_SOURCES	= bfs.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
diff --git a/libparted/fs/ext2/Makefile.am b/libparted/fs/ext2/Makefile.am
index a04a7a6..8ee3821 100644
--- a/libparted/fs/ext2/Makefile.am
+++ b/libparted/fs/ext2/Makefile.am
@@ -16,6 +16,6 @@ libext2_la_SOURCES    =	ext2.c \
 			tune.c \
 			tune.h
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/fat/Makefile.am b/libparted/fs/fat/Makefile.am
index f0c84ef..f07fa74 100644
--- a/libparted/fs/fat/Makefile.am
+++ b/libparted/fs/fat/Makefile.am
@@ -21,6 +21,6 @@ libfat_la_SOURCES     = bootsector.c	\
 			traverse.h	\
 			resize.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/hfs/Makefile.am b/libparted/fs/hfs/Makefile.am
index 2c3829b..00cefe4 100644
--- a/libparted/fs/hfs/Makefile.am
+++ b/libparted/fs/hfs/Makefile.am
@@ -12,6 +12,6 @@ libhfs_la_SOURCES	= hfs.c hfs.h \
 			  reloc_plus.c reloc_plus.h \
 			  journal.c journal.h
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/jfs/Makefile.am b/libparted/fs/jfs/Makefile.am
index 1d0af94..0218667 100644
--- a/libparted/fs/jfs/Makefile.am
+++ b/libparted/fs/jfs/Makefile.am
@@ -3,6 +3,6 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= libjfs.la
 libjfs_la_SOURCES	= jfs.c jfs_superblock.h jfs_types.h
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
\ No newline at end of file
diff --git a/libparted/fs/linux_swap/Makefile.am b/libparted/fs/linux_swap/Makefile.am
index a84cf59..a366fc6 100644
--- a/libparted/fs/linux_swap/Makefile.am
+++ b/libparted/fs/linux_swap/Makefile.am
@@ -3,6 +3,6 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= liblinuxswap.la
 liblinuxswap_la_SOURCES	= linux_swap.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/ntfs/Makefile.am b/libparted/fs/ntfs/Makefile.am
index e76ad4e..30fca41 100644
--- a/libparted/fs/ntfs/Makefile.am
+++ b/libparted/fs/ntfs/Makefile.am
@@ -3,6 +3,6 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= libntfs.la
 libntfs_la_SOURCES	= ntfs.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/reiserfs/Makefile.am b/libparted/fs/reiserfs/Makefile.am
index adefc42..ce65ab4 100644
--- a/libparted/fs/reiserfs/Makefile.am
+++ b/libparted/fs/reiserfs/Makefile.am
@@ -4,6 +4,6 @@ noinst_LTLIBRARIES	= libreiserfs.la
 
 libreiserfs_la_SOURCES	= reiserfs.c reiserfs.h geom_dal.c geom_dal.h
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/ufs/Makefile.am b/libparted/fs/ufs/Makefile.am
index 633b86a..e913c2d 100644
--- a/libparted/fs/ufs/Makefile.am
+++ b/libparted/fs/ufs/Makefile.am
@@ -3,6 +3,6 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= libufs.la
 libufs_la_SOURCES	= ufs.c
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/fs/xfs/Makefile.am b/libparted/fs/xfs/Makefile.am
index c1a0710..d5559c2 100644
--- a/libparted/fs/xfs/Makefile.am
+++ b/libparted/fs/xfs/Makefile.am
@@ -3,6 +3,6 @@ partedincludedir	= -I$(top_srcdir)/include
 noinst_LTLIBRARIES	= libxfs.la
 libxfs_la_SOURCES	= xfs.c xfs_sb.h xfs_types.h platform_defs.h
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/labels/Makefile.am b/libparted/labels/Makefile.am
index dc51b9f..d7621db 100644
--- a/libparted/labels/Makefile.am
+++ b/libparted/labels/Makefile.am
@@ -3,7 +3,7 @@
 #
 # This file may be modified and/or distributed without restriction.
 
-LIBS = @INTLLIBS@ @LIBS@
+LIBS = $(INTLLIBS) $(LIBS)
 
 partedincludedir      =	-I$(top_srcdir)/include
 noinst_LTLIBRARIES    =	liblabels.la
@@ -26,8 +26,8 @@ liblabels_la_SOURCES  = rdb.c		\
 			sun.c		\
 			aix.c
 
-liblabels_la_LIBADD   = @OS_LIBS@
+liblabels_la_LIBADD   = $(OS_LIBS)
 
-INCLUDES = $(partedincludedir) @INTLINCS@
+INCLUDES = $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/libparted/tests/Makefile.am b/libparted/tests/Makefile.am
index 62d7c2c..8c1e07b 100644
--- a/libparted/tests/Makefile.am
+++ b/libparted/tests/Makefile.am
@@ -5,8 +5,8 @@
 
 TESTS = label
 bin_PROGRAMS     = label
-label_CFLAGS    = @CHECK_CFLAGS@ -I$(top_srcdir)/include
-label_LDADD     = @CHECK_LIBS@ $(top_builddir)/libparted/libparted.la
+label_CFLAGS    = $(CHECK_CFLAGS) -I$(top_srcdir)/include
+label_LDADD     = $(CHECK_LIBS) $(top_builddir)/libparted/libparted.la
 label_SOURCES   = common.h common.c label.c
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/parted/Makefile.am b/parted/Makefile.am
index b94e075..c699102 100644
--- a/parted/Makefile.am
+++ b/parted/Makefile.am
@@ -12,7 +12,7 @@ parted_SOURCES = command.c	\
 		 table.c	\
 		 table.h
 
-#parted_CFLAGS = -DBUILDINFO='"\"'@BUILDINFO@'\""'
+#parted_CFLAGS = -DBUILDINFO='"\"'$(BUILDINFO)'\""'
 parted_CFLAGS = -DBUILDINFO=
 
 parted_LDADD = \
@@ -21,8 +21,8 @@ parted_LDADD = \
   $(INTLLIBS) $(LIBS) \
   $(PARTED_LIBS)
 
-parted_LDFLAGS = @PARTEDLDFLAGS@
+parted_LDFLAGS = $(PARTEDLDFLAGS)
 
-INCLUDES	= $(partedincludedir) @INTLINCS@
+INCLUDES	= $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in
diff --git a/partprobe/Makefile.am b/partprobe/Makefile.am
index 65755c3..cbb955f 100644
--- a/partprobe/Makefile.am
+++ b/partprobe/Makefile.am
@@ -10,8 +10,8 @@ partprobe_LDADD = \
   $(INTLLIBS) $(LIBS) \
   $(PARTED_LIBS)
 
-partprobe_LDFLAGS = @PARTEDLDFLAGS@
+partprobe_LDFLAGS = $(PARTEDLDFLAGS)
 
-INCLUDES	= $(partedincludedir) @INTLINCS@
+INCLUDES	= $(partedincludedir) $(INTLINCS)
 
 MAINTAINERCLEANFILES = Makefile.in



More information about the parted-devel mailing list